Fix: ajout option "accusé réception" à la classe simplemail
This commit is contained in:
parent
dbbe0ff656
commit
36862c4aaf
@ -7,6 +7,7 @@ class simplemail {
|
|||||||
var $hfrom;
|
var $hfrom;
|
||||||
var $hbcc;
|
var $hbcc;
|
||||||
var $hcc;
|
var $hcc;
|
||||||
|
var $deliveryreceipt;
|
||||||
|
|
||||||
var $Xsender;
|
var $Xsender;
|
||||||
var $ErrorsTo;
|
var $ErrorsTo;
|
||||||
@ -110,6 +111,13 @@ class simplemail {
|
|||||||
return TRUE;
|
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
|
// les attachements
|
||||||
function addattachement($filename) {
|
function addattachement($filename) {
|
||||||
@ -280,6 +288,8 @@ class simplemail {
|
|||||||
|
|
||||||
if ( !empty($this->replyto) ) $this->AddField2Header("Reply-To",$this->replyto);
|
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";
|
$this->headers .="MIME-Version: 1.0\r\n";
|
||||||
|
|
||||||
if ( !$this->html && $this->text && !empty($this->attachement) ) {
|
if ( !$this->html && $this->text && !empty($this->attachement) ) {
|
||||||
|
|||||||
@ -238,6 +238,12 @@ class CMailFile
|
|||||||
$this->splitAddress($from);
|
$this->splitAddress($from);
|
||||||
$mail->addfrom($this->sEmail,$this->sName);
|
$mail->addfrom($this->sEmail,$this->sName);
|
||||||
|
|
||||||
|
// Ajout accuse reception
|
||||||
|
if ($deliveryreceipt)
|
||||||
|
{
|
||||||
|
$mail->adddeliveryreceipt($this->sEmail,$this->sName);
|
||||||
|
}
|
||||||
|
|
||||||
// Ajout du destinataire
|
// Ajout du destinataire
|
||||||
$arrayTo=split(',',$to);
|
$arrayTo=split(',',$to);
|
||||||
foreach($arrayTo as $val)
|
foreach($arrayTo as $val)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user