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