diff options
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/compose.inc | 16 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index d278279d9..b25c3690f 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -567,6 +567,22 @@ function rcmail_priority_selector($attrib) } +function rcmail_receipt_checkbox($attrib) + { + list($form_start, $form_end) = get_form_tags($attrib); + unset($attrib['form']); + + $attrib['name'] = '_receipt'; + $checkbox = new checkbox(array('name' => '_receipt', 'id' => 'receipt', 'value' => 1)); + + $out = $form_start ? "$form_start\n" : ''; + $out .= $checkbox->show(0); + $out .= $form_end ? "\n$form_end" : ''; + + return $out; + } + + function get_form_tags($attrib) { global $CONFIG, $OUTPUT, $JS_OBJECT_NAME, $MESSAGE_FORM, $SESS_HIDDEN_FIELD; diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 33f023de1..f8d3ada4f 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -136,6 +136,11 @@ if (!empty($_POST['_priority'])) $headers['X-Priority'] = sprintf("%d (%s)", $priority, ucfirst($str_priority)); } +if (!empty($_POST['_receipt'])) + { + $headers['Return-Receipt-To'] = $identity_arr['string']; + $headers['Disposition-Notification-To'] = $identity_arr['string']; + } // additional headers $headers['Message-ID'] = $message_id; |