Prepare support of In-Reply-To
This commit is contained in:
parent
6b5fac432f
commit
b77675db7c
@ -85,7 +85,7 @@ class FormMail extends Form
|
|||||||
public $toid;
|
public $toid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string replyto name
|
* @var string Reply-to name
|
||||||
*/
|
*/
|
||||||
public $replytoname;
|
public $replytoname;
|
||||||
|
|
||||||
@ -95,20 +95,25 @@ class FormMail extends Form
|
|||||||
public $replytomail;
|
public $replytomail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string to name
|
* @var string To name
|
||||||
*/
|
*/
|
||||||
public $toname;
|
public $toname;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string to email
|
* @var string To email
|
||||||
*/
|
*/
|
||||||
public $tomail;
|
public $tomail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string trackid
|
* @var string Track id
|
||||||
*/
|
*/
|
||||||
public $trackid;
|
public $trackid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string If you know a MSGID of an email and want to send the email in reply to it. Will be added into header as In-Reply-To: <...>
|
||||||
|
*/
|
||||||
|
public $inreplyto;
|
||||||
|
|
||||||
public $withsubstit; // Show substitution array
|
public $withsubstit; // Show substitution array
|
||||||
public $withfrom;
|
public $withfrom;
|
||||||
|
|
||||||
@ -449,6 +454,7 @@ class FormMail extends Form
|
|||||||
$out .= '<input style="display:none" type="submit" id="sendmailhidden" name="sendmail">';
|
$out .= '<input style="display:none" type="submit" id="sendmailhidden" name="sendmail">';
|
||||||
$out .= '<input type="hidden" name="token" value="'.newToken().'" />';
|
$out .= '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||||
$out .= '<input type="hidden" name="trackid" value="'.$this->trackid.'" />';
|
$out .= '<input type="hidden" name="trackid" value="'.$this->trackid.'" />';
|
||||||
|
$out .= '<input type="hidden" name="inreplyto" value="'.$this->inreplyto.'" />';
|
||||||
}
|
}
|
||||||
if (!empty($this->withfrom)) {
|
if (!empty($this->withfrom)) {
|
||||||
if (!empty($this->withfromreadonly)) {
|
if (!empty($this->withfromreadonly)) {
|
||||||
@ -458,7 +464,7 @@ class FormMail extends Form
|
|||||||
}
|
}
|
||||||
foreach ($this->param as $key => $value) {
|
foreach ($this->param as $key => $value) {
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
$out .= "<!-- param key=".$key." is array, we do not output input filed for it -->\n";
|
$out .= "<!-- param key=".$key." is array, we do not output input field for it -->\n";
|
||||||
} else {
|
} else {
|
||||||
$out .= '<input type="hidden" id="'.$key.'" name="'.$key.'" value="'.$value.'" />'."\n";
|
$out .= '<input type="hidden" id="'.$key.'" name="'.$key.'" value="'.$value.'" />'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -147,7 +147,8 @@ if ($action == 'presend') {
|
|||||||
$formmail->fromtype = 'special';
|
$formmail->fromtype = 'special';
|
||||||
}
|
}
|
||||||
|
|
||||||
$formmail->trackid = $trackid;
|
$formmail->trackid = empty($trackid) ? '' : $trackid;
|
||||||
|
$formmail->inreplyto = empty($inreplyto) ? '' : $inreplyto;
|
||||||
$formmail->withfrom = 1;
|
$formmail->withfrom = 1;
|
||||||
|
|
||||||
// Fill list of recipient with email inside <>.
|
// Fill list of recipient with email inside <>.
|
||||||
|
|||||||
@ -652,6 +652,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
$defaulttopic = 'InformationMessage';
|
$defaulttopic = 'InformationMessage';
|
||||||
$diroutput = $conf->recruitment->dir_output;
|
$diroutput = $conf->recruitment->dir_output;
|
||||||
$trackid = 'recruitmentcandidature'.$object->id;
|
$trackid = 'recruitmentcandidature'.$object->id;
|
||||||
|
$inreplyto = $object->email_msgid;
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user