source: github/program/steps/mail/sendmdn.inc @ 881217a

HEADcourier-fixdev-browser-capabilitiespdorelease-0.6release-0.7release-0.8
Last change on this file since 881217a was 881217a, checked in by thomascube <thomas@…>, 4 years ago

Force ajax calls to protect from CSRF

  • Property mode set to 100644
File size: 1.5 KB
Line 
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
23if (!$OUTPUT->ajax_call)
24  return;
25
26if (!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
31if ($sent) {
32  $OUTPUT->set_env('mdn_request', false);
33  $OUTPUT->show_message('receiptsent', 'confirmation');
34}
35else if ($smtp_error) {
36  $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']);
37}
38else {
39  $OUTPUT->show_message('errorsendingreceipt', 'error');
40}
41
42$OUTPUT->send();
43
44?>
Note: See TracBrowser for help on using the repository browser.