Hi.
This is my first contact on this list and I would like to share with you this new "feature" :-)
I would like to suggest the "Confirm-Delivery" functionality to Compose window.
Scenario: You want to send an e-mail and you need a way to confirm that your MAILSERVER delivered it successfull to the DESTINATION MAILSERVER.
Many MTAs implement "Succesfull Delivery Report" (POSTFIX for example).
All you (the client) need to do is: RCPT-TO: xxx@yyy.com NOTIFY=SUCCESS
To make it work on RC, I did this:
[ ] Confirm Delivery
<td id="delivery-selector">
<roundcube:object name="deliveryCheckBox" form="form"
id="rcmcomposedelivery" /> <label for="rcmcomposedelivery"><roundcube:label name="confirmdelivery" /></label> </td>
... $labels['confirmdelivery'] = 'Confirm delivery'; ...
#priority-selector, #receipt-selector, #delivery-selector { padding-left: 30px; white-space: nowrap; }
function rcmail_delivery_checkbox($attrib) { global $MESSAGE, $compose_mode;
list($form_start, $form_end) = get_form_tags($attrib); unset($attrib['form']);
if (!isset($attrib['id'])) $attrib['id'] = 'delivery';
$attrib['name'] = '_delivery'; $attrib['value'] = '1'; $checkdelivery = new html_checkbox($attrib);
$out = $form_start ? "$form_start\n" : ''; $out .= $checkdelivery->show(in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT)) && $MESSAGE->headers->mdn_to ? 1 : 0); $out .= $form_end ? "\n$form_end" : '';
return $out; }
$OUTPUT->add_handlers(array( ... 'deliverycheckbox' => 'rcmail_delivery_checkbox', ... ));
if (!empty($_POST['_delivery'])) { $headers['Return-receipt-to'] = $from; }
message:
public function send_mail($from, $recipients, &$headers, &$body) { if (!is_object($this->conn)) return false; // we use this special header to know if this message requires delivery report $confirm_delivery = eregi("Return-receipt-to",$headers) ? "NOTIFY=SUCCESS":""; ... ... // set mail recipients foreach ($recipients as $recipient) { // here: if (PEAR::isError($this->conn->rcptTo($recipient,$confirm_delivery))) { ...
And that's it!!
Just for info: I used "Return-receipt-to" header because I saw it on messages sent by PegasusMail client. (when I check the "Confirm Delivery" checkBox in pegasus)
This software is just GREAT !! thanks!
List info: http://lists.roundcube.net/dev/