X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=program%2Fsteps%2Fmail%2Fsendmdn.inc;h=a108453fd610120e12f3e27de48496eaa9a9529c;hb=3692d675e38910cbe1536b941ec74d5b198e70b6;hp=191f950c198ebb7b8c1d1434439a32ac09850e82;hpb=244596b3e5adbf9b7c67bf9d03ee49fbdd915e37;p=roundcube.git diff --git a/program/steps/mail/sendmdn.inc b/program/steps/mail/sendmdn.inc index 191f950..a108453 100644 --- a/program/steps/mail/sendmdn.inc +++ b/program/steps/mail/sendmdn.inc @@ -4,8 +4,8 @@ +-----------------------------------------------------------------------+ | program/steps/mail/sendmdn.inc | | | - | This file is part of the RoundCube Webmail client | - | Copyright (C) 2008, RoundCube Dev. - Switzerland | + | This file is part of the Roundcube Webmail client | + | Copyright (C) 2008-2009, The Roundcube Dev Team | | Licensed under the GNU GPL | | | | PURPOSE: | @@ -15,13 +15,16 @@ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ - $Id: sendmail.inc 930 2007-11-25 17:34:19Z thomasb $ + $Id: sendmdn.inc 4410 2011-01-12 18:25:02Z thomasb $ */ +// only process ajax requests +if (!$OUTPUT->ajax_call) + return; if (!empty($_POST['_uid'])) { - $sent = rcmail_send_mdn(get_input_value('_uid', RCUBE_INPUT_POST)); + $sent = rcmail_send_mdn(get_input_value('_uid', RCUBE_INPUT_POST), $smtp_error); } // show either confirm or error message @@ -29,10 +32,11 @@ if ($sent) { $OUTPUT->set_env('mdn_request', false); $OUTPUT->show_message('receiptsent', 'confirmation'); } +else if ($smtp_error) { + $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']); +} else { $OUTPUT->show_message('errorsendingreceipt', 'error'); } $OUTPUT->send(); - -?> \ No newline at end of file