You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sendmdn.inc 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. +-----------------------------------------------------------------------+
  4. | program/steps/mail/sendmdn.inc |
  5. | |
  6. | This file is part of the Roundcube Webmail client |
  7. | Copyright (C) 2008-2013, The Roundcube Dev Team |
  8. | |
  9. | Licensed under the GNU General Public License version 3 or |
  10. | any later version with exceptions for skins & plugins. |
  11. | See the README file for a full license statement. |
  12. | |
  13. | PURPOSE: |
  14. | Send a message disposition notification for a specific mail |
  15. | |
  16. +-----------------------------------------------------------------------+
  17. | Author: Thomas Bruederli <roundcube@gmail.com> |
  18. +-----------------------------------------------------------------------+
  19. */
  20. // only process ajax requests
  21. if (!$OUTPUT->ajax_call) {
  22. return;
  23. }
  24. if (!empty($_POST['_uid'])) {
  25. $sent = rcmail_send_mdn(rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST), $smtp_error);
  26. }
  27. // show either confirm or error message
  28. if ($sent) {
  29. $OUTPUT->set_env('mdn_request', false);
  30. $OUTPUT->show_message('receiptsent', 'confirmation');
  31. }
  32. else if ($smtp_error) {
  33. $OUTPUT->show_message($smtp_error['label'], 'error', $smtp_error['vars']);
  34. }
  35. else {
  36. $OUTPUT->show_message('errorsendingreceipt', 'error');
  37. }
  38. $OUTPUT->send();