SMTPMail Sendmail_Core: align blind_copy and reply_to
This commit is contained in:
parent
85022945dc
commit
d919c5fd1e
2 changed files with 11 additions and 3 deletions
|
|
@ -52,6 +52,7 @@ class Sendmail_Core
|
|||
// for postfix, it should be "-f {$this->from}" for the Return-Path
|
||||
protected $phpmailer; //!< PHPMailer object;
|
||||
protected $blind_copy; //!< email of blind copy (list of emails separated by comma)
|
||||
protected $reply_to; //!< reply to
|
||||
|
||||
function __construct()
|
||||
{
|
||||
|
|
@ -231,7 +232,9 @@ class Sendmail_Core
|
|||
{
|
||||
$this->phpmailer->addBCC($a_blind_copy[$i]);
|
||||
}
|
||||
|
||||
if ( ! empty ($this->reply_to)) {
|
||||
$this->phpmailer->addReplyTo($this->reply_to);
|
||||
}
|
||||
$this->phpmailer->preSend();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,11 +90,16 @@ class SMTPMail
|
|||
}
|
||||
|
||||
/**
|
||||
* @param mixed $blind_copy
|
||||
* @param string $blind_copy list of emails BCC separated by a comma
|
||||
*/
|
||||
public function setBlindCopy($blind_copy): SMTPMail
|
||||
{
|
||||
$this->phpmailer->addBCC($this->blind_copy);
|
||||
$a_blind_copy=explode(",",$blind_copy??"");
|
||||
$nb_blind_copy=count($a_blind_copy);
|
||||
for ($i=0;$i<$nb_blind_copy;$i++)
|
||||
{
|
||||
$this->phpmailer->addBCC($a_blind_copy[$i]);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue