forked from extern/egroupware
* Mail: support the propagation of Thread-Topic, Thread-Index and List-Id on reply too
This commit is contained in:
parent
dcbf30d674
commit
2172fc769d
@ -4626,6 +4626,9 @@ class emailadmin_imapbase
|
|||||||
);
|
);
|
||||||
if (isset($headers['IN-REPLY-TO'])) $newData['IN-REPLY-TO'] = $headers['IN-REPLY-TO'];
|
if (isset($headers['IN-REPLY-TO'])) $newData['IN-REPLY-TO'] = $headers['IN-REPLY-TO'];
|
||||||
if (isset($headers['REFERENCES'])) $newData['REFERENCES'] = $headers['REFERENCES'];
|
if (isset($headers['REFERENCES'])) $newData['REFERENCES'] = $headers['REFERENCES'];
|
||||||
|
if (isset($headers['THREAD-TOPIC'])) $newData['THREAD-TOPIC'] = $headers['THREAD-TOPIC'];
|
||||||
|
if (isset($headers['THREAD-INDEX'])) $newData['THREAD-INDEX'] = $headers['THREAD-INDEX'];
|
||||||
|
if (isset($headers['LIST-ID'])) $newData['LIST-ID'] = $headers['LIST-ID'];
|
||||||
//_debug_array($newData);
|
//_debug_array($newData);
|
||||||
$recepientList = array('FROM', 'TO', 'CC', 'BCC', 'SENDER', 'REPLY-TO');
|
$recepientList = array('FROM', 'TO', 'CC', 'BCC', 'SENDER', 'REPLY-TO');
|
||||||
foreach($recepientList as $recepientType) {
|
foreach($recepientList as $recepientType) {
|
||||||
|
@ -1310,6 +1310,9 @@ class mail_compose
|
|||||||
$preserv['processedmail_id'] = $content['processedmail_id'];
|
$preserv['processedmail_id'] = $content['processedmail_id'];
|
||||||
$preserv['references'] = $content['references'];
|
$preserv['references'] = $content['references'];
|
||||||
$preserv['in-reply-to'] = $content['in-reply-to'];
|
$preserv['in-reply-to'] = $content['in-reply-to'];
|
||||||
|
$preserv['thread-topic'] = $content['thread-topic'];
|
||||||
|
$preserv['thread-index'] = $content['thread-index'];
|
||||||
|
$preserv['list-id'] = $content['list-id'];
|
||||||
$preserv['mode'] = $content['mode'];
|
$preserv['mode'] = $content['mode'];
|
||||||
// convert it back to checkbox expectations
|
// convert it back to checkbox expectations
|
||||||
if($content['mimeType'] == 'html') {
|
if($content['mimeType'] == 'html') {
|
||||||
@ -1952,6 +1955,9 @@ class mail_compose
|
|||||||
$this->sessionData['messageFolder'] = $_folder;
|
$this->sessionData['messageFolder'] = $_folder;
|
||||||
$this->sessionData['in-reply-to'] = ($headers['IN-REPLY-TO']?$headers['IN-REPLY-TO']:$headers['MESSAGE_ID']);
|
$this->sessionData['in-reply-to'] = ($headers['IN-REPLY-TO']?$headers['IN-REPLY-TO']:$headers['MESSAGE_ID']);
|
||||||
$this->sessionData['references'] = ($headers['REFERENCES']?$headers['REFERENCES']:$headers['MESSAGE_ID']);
|
$this->sessionData['references'] = ($headers['REFERENCES']?$headers['REFERENCES']:$headers['MESSAGE_ID']);
|
||||||
|
if ($headers['THREAD-TOPIC']) $this->sessionData['thread-topic'] = $headers['THREAD-TOPIC'];
|
||||||
|
if ($headers['THREAD-INDEX']) $this->sessionData['thread-index'] = $headers['THREAD-INDEX'];
|
||||||
|
if ($headers['LIST-ID']) $this->sessionData['list-id'] = $headers['LIST-ID'];
|
||||||
//error_log(__METHOD__.__LINE__.' Mode:'.$_mode.':'.array2string($headers));
|
//error_log(__METHOD__.__LINE__.' Mode:'.$_mode.':'.array2string($headers));
|
||||||
// check for Reply-To: header and use if available
|
// check for Reply-To: header and use if available
|
||||||
if(!empty($headers['REPLY-TO']) && ($headers['REPLY-TO'] != $headers['FROM'])) {
|
if(!empty($headers['REPLY-TO']) && ($headers['REPLY-TO'] != $headers['FROM'])) {
|
||||||
@ -2169,9 +2175,28 @@ class mail_compose
|
|||||||
$_mailObject->Priority = $_formData['priority'];
|
$_mailObject->Priority = $_formData['priority'];
|
||||||
$_mailObject->Encoding = 'quoted-printable';
|
$_mailObject->Encoding = 'quoted-printable';
|
||||||
$_mailObject->AddCustomHeader('X-Mailer: EGroupware-Mail');
|
$_mailObject->AddCustomHeader('X-Mailer: EGroupware-Mail');
|
||||||
if(isset($_formData['in-reply-to'])) {
|
if(isset($_formData['in-reply-to']) && !empty($_formData['in-reply-to'])) {
|
||||||
|
if (stripos($_formData['in-reply-to'],'<')===false) $_formData['in-reply-to']='<'.trim($_formData['in-reply-to']).'>';
|
||||||
|
//error_log(__METHOD__.__LINE__.'$_mailObject->AddCustomHeader(In-Reply-To: '. $_formData['in-reply-to'].")");
|
||||||
$_mailObject->AddCustomHeader('In-Reply-To: '. $_formData['in-reply-to']);
|
$_mailObject->AddCustomHeader('In-Reply-To: '. $_formData['in-reply-to']);
|
||||||
}
|
}
|
||||||
|
if(isset($_formData['references']) && !empty($_formData['references'])) {
|
||||||
|
if (stripos($_formData['references'],'<')===false) $_formData['references']='<'.trim($_formData['references']).'>';
|
||||||
|
//error_log(__METHOD__.__LINE__.'$_mailObject->AddCustomHeader(References: '. $_formData['references'].")");
|
||||||
|
$_mailObject->AddCustomHeader('References: '. $_formData['references']);
|
||||||
|
}
|
||||||
|
if(isset($_formData['thread-topic']) && !empty($_formData['thread-topic'])) {
|
||||||
|
//error_log(__METHOD__.__LINE__.'$_mailObject->AddCustomHeader(Tread-Topic: '. $_formData['thread-topic'].")");
|
||||||
|
$_mailObject->AddCustomHeader('Thread-Topic: '. $_formData['thread-topic']);
|
||||||
|
}
|
||||||
|
if(isset($_formData['thread-index']) && !empty($_formData['thread-index'])) {
|
||||||
|
//error_log(__METHOD__.__LINE__.'$_mailObject->AddCustomHeader(Tread-Index: '. $_formData['thread-index'].")");
|
||||||
|
$_mailObject->AddCustomHeader('Thread-Index: '. $_formData['thread-index']);
|
||||||
|
}
|
||||||
|
if(isset($_formData['list-id']) && !empty($_formData['list-id'])) {
|
||||||
|
//error_log(__METHOD__.__LINE__.'$_mailObject->AddCustomHeader(List-Id: '. $_formData['list-id'].")");
|
||||||
|
$_mailObject->AddCustomHeader('List-Id: '. $_formData['list-id']);
|
||||||
|
}
|
||||||
if($_formData['disposition']) {
|
if($_formData['disposition']) {
|
||||||
$_mailObject->AddCustomHeader('Disposition-Notification-To: '. $_identity['ident_email']);
|
$_mailObject->AddCustomHeader('Disposition-Notification-To: '. $_identity['ident_email']);
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,11 @@
|
|||||||
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="processedmail_id"/>
|
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="processedmail_id"/>
|
||||||
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="mode"/>
|
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="mode"/>
|
||||||
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="lastdrafted"/>
|
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="lastdrafted"/>
|
||||||
|
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="references"/>
|
||||||
|
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="in-reply-to"/>
|
||||||
|
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="thread-topic"/>
|
||||||
|
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="thread-index"/>
|
||||||
|
<textbox class="mail-index_quotaDisplayNone" readonly="true" id="list-id"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<taglist-email id="replyto" empty_label="Reply to" width="100%" maxSelection="1" onclick="app.mail.address_click"/>
|
<taglist-email id="replyto" empty_label="Reply to" width="100%" maxSelection="1" onclick="app.mail.address_click"/>
|
||||||
<hbox>
|
<hbox>
|
||||||
|
Loading…
Reference in New Issue
Block a user