From f22ea7ba1875863890b486db3e5f448f99c1debc Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 07 Oct 2010 04:52:05 -0400
Subject: [PATCH] - Support SMTP Delivery Status Notifications - RFC3461 (#1486142)

---
 program/steps/mail/compose.inc |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index c1f4914..406033c 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -1174,6 +1174,28 @@
 }
 
 
+function rcmail_dsn_checkbox($attrib)
+{
+  global $RCMAIL;
+
+  list($form_start, $form_end) = get_form_tags($attrib);
+  unset($attrib['form']);
+
+  if (!isset($attrib['id']))
+    $attrib['id'] = 'dsn';
+
+  $attrib['name'] = '_dsn';
+  $attrib['value'] = '1';
+  $checkbox = new html_checkbox($attrib);
+
+  $out = $form_start ? "$form_start\n" : '';
+  $out .= $checkbox->show($RCMAIL->config->get('dsn_default'));
+  $out .= $form_end ? "\n$form_end" : '';
+
+  return $out;
+}
+
+
 function rcmail_editor_selector($attrib)
 {
   global $CONFIG, $MESSAGE, $compose_mode;
@@ -1251,6 +1273,7 @@
   'priorityselector' => 'rcmail_priority_selector',
   'editorselector' => 'rcmail_editor_selector',
   'receiptcheckbox' => 'rcmail_receipt_checkbox',
+  'dsncheckbox' => 'rcmail_dsn_checkbox',
   'storetarget' => 'rcmail_store_target_selection',
 ));
 

--
Gitblit v1.9.1