alecpl
2010-09-25 e019f2d0f2dc2fbfa345ab5d7ae85e67bfdd76b8
commit | author | age
fba1f5 1 <?php
T 2
3 /*
4  +-----------------------------------------------------------------------+
5  | program/steps/mail/sendmdn.inc                                        |
6  |                                                                       |
e019f2 7  | This file is part of the Roundcube Webmail client                     |
A 8  | Copyright (C) 2008-2009, Roundcube Dev. - Switzerland                 |
fba1f5 9  | Licensed under the GNU GPL                                            |
T 10  |                                                                       |
11  | PURPOSE:                                                              |
12  |   Send a message disposition notification for a specific mail         |
13  |                                                                       |
14  +-----------------------------------------------------------------------+
15  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
16  +-----------------------------------------------------------------------+
17
580ff9 18  $Id$
fba1f5 19
T 20 */
21
881217 22 // only process ajax requests
T 23 if (!$OUTPUT->ajax_call)
24   return;
fba1f5 25
0ea884 26 if (!empty($_POST['_uid'])) {
2818f8 27   $sent = rcmail_send_mdn(get_input_value('_uid', RCUBE_INPUT_POST), $smtp_error);
fba1f5 28 }
T 29
0ea884 30 // show either confirm or error message
T 31 if ($sent) {
32   $OUTPUT->set_env('mdn_request', false);
33   $OUTPUT->show_message('receiptsent', 'confirmation');
34 }
2818f8 35 else if ($smtp_error) {
A 36   $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']);
37 }
0ea884 38 else {
T 39   $OUTPUT->show_message('errorsendingreceipt', 'error');
40 }
41
fba1f5 42 $OUTPUT->send();