Fix: ajout option "accus rception" la classe simplemail
This commit is contained in:
parent
dbbe0ff656
commit
36862c4aaf
@ -7,6 +7,7 @@ class simplemail {
|
||||
var $hfrom;
|
||||
var $hbcc;
|
||||
var $hcc;
|
||||
var $deliveryreceipt;
|
||||
|
||||
var $Xsender;
|
||||
var $ErrorsTo;
|
||||
@ -109,6 +110,13 @@ class simplemail {
|
||||
$this->returnpath = $tmp;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function adddeliveryreceipt($deliveryreceipt) {
|
||||
$tmp=$this->makenameplusaddress($deliveryreceipt,'');
|
||||
if ( !$tmp ) { $this->error_log(" Disposition-Notification-To: error"); return FALSE; }
|
||||
$this->deliveryreceipt = $tmp;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// les attachements
|
||||
@ -280,6 +288,8 @@ class simplemail {
|
||||
|
||||
if ( !empty($this->replyto) ) $this->AddField2Header("Reply-To",$this->replyto);
|
||||
|
||||
if ( !empty($this->deliveryreceipt) ) $this->AddField2Header("Disposition-Notification-To",$this->deliveryreceipt);
|
||||
|
||||
$this->headers .="MIME-Version: 1.0\r\n";
|
||||
|
||||
if ( !$this->html && $this->text && !empty($this->attachement) ) {
|
||||
|
||||
@ -238,6 +238,12 @@ class CMailFile
|
||||
$this->splitAddress($from);
|
||||
$mail->addfrom($this->sEmail,$this->sName);
|
||||
|
||||
// Ajout accuse reception
|
||||
if ($deliveryreceipt)
|
||||
{
|
||||
$mail->adddeliveryreceipt($this->sEmail,$this->sName);
|
||||
}
|
||||
|
||||
// Ajout du destinataire
|
||||
$arrayTo=split(',',$to);
|
||||
foreach($arrayTo as $val)
|
||||
@ -267,7 +273,7 @@ class CMailFile
|
||||
$mail->addbcc($this->sEmail,$this->sName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//ajout du sujet
|
||||
$mail->addsubject($this->encodetorfc2822($subject));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user