Changeset View
Changeset View
Standalone View
Standalone View
externals/phpmailer/class.phpmailer-lite.php
Show First 20 Lines • Show All 648 Lines • ▼ Show 20 Lines | */ | ||||
protected function MailSend($header, $body) { | protected function MailSend($header, $body) { | ||||
$toArr = array(); | $toArr = array(); | ||||
foreach($this->to as $t) { | foreach($this->to as $t) { | ||||
$toArr[] = $this->AddrFormat($t); | $toArr[] = $this->AddrFormat($t); | ||||
} | } | ||||
$to = implode(', ', $toArr); | $to = implode(', ', $toArr); | ||||
$params = sprintf("-oi -f %s", $this->Sender); | $params = sprintf("-oi -f %s", $this->Sender); | ||||
if ($this->Sender != '' && strlen(ini_get('safe_mode'))< 1) { | if ($this->Sender != '') { | ||||
$old_from = ini_get('sendmail_from'); | $old_from = ini_get('sendmail_from'); | ||||
ini_set('sendmail_from', $this->Sender); | ini_set('sendmail_from', $this->Sender); | ||||
if ($this->SingleTo === true && count($toArr) > 1) { | if ($this->SingleTo === true && count($toArr) > 1) { | ||||
foreach ($toArr as $key => $val) { | foreach ($toArr as $key => $val) { | ||||
$rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); | $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); | ||||
// implement call back function if it exists | // implement call back function if it exists | ||||
$isSent = ($rt == 1) ? 1 : 0; | $isSent = ($rt == 1) ? 1 : 0; | ||||
$this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); | $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); | ||||
▲ Show 20 Lines • Show All 1,517 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0