Update CMailFile.class.php
This commit is contained in:
parent
b6ff439964
commit
32ac59622c
@ -470,12 +470,12 @@ class CMailFile
|
|||||||
$emailMatchs = preg_match_all($regexp, $from, $adressEmailFrom);
|
$emailMatchs = preg_match_all($regexp, $from, $adressEmailFrom);
|
||||||
$adressEmailFrom = reset($adressEmailFrom);
|
$adressEmailFrom = reset($adressEmailFrom);
|
||||||
if ($emailMatchs !== false && filter_var($conf->global->MAIN_MAIL_SMTPS_ID, FILTER_VALIDATE_EMAIL) && $conf->global->MAIN_MAIL_SMTPS_ID !== $adressEmailFrom) {
|
if ($emailMatchs !== false && filter_var($conf->global->MAIN_MAIL_SMTPS_ID, FILTER_VALIDATE_EMAIL) && $conf->global->MAIN_MAIL_SMTPS_ID !== $adressEmailFrom) {
|
||||||
$result = $this->message->setFrom($conf->global->MAIN_MAIL_SMTPS_ID);
|
$this->message->setFrom($conf->global->MAIN_MAIL_SMTPS_ID);
|
||||||
} else {
|
} else {
|
||||||
$result = $this->message->setFrom($this->getArrayAddress($this->addr_from));
|
$this->message->setFrom($this->getArrayAddress($this->addr_from));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = $this->message->setFrom($this->getArrayAddress($this->addr_from));
|
$this->message->setFrom($this->getArrayAddress($this->addr_from));
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->errors[] = $e->getMessage();
|
$this->errors[] = $e->getMessage();
|
||||||
@ -485,7 +485,7 @@ class CMailFile
|
|||||||
// Set the To addresses with an associative array
|
// Set the To addresses with an associative array
|
||||||
if (!empty($this->addr_to)) {
|
if (!empty($this->addr_to)) {
|
||||||
try {
|
try {
|
||||||
$result = $this->message->setTo($this->getArrayAddress($this->addr_to));
|
$this->message->setTo($this->getArrayAddress($this->addr_to));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->errors[] = $e->getMessage();
|
$this->errors[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
@ -493,14 +493,14 @@ class CMailFile
|
|||||||
|
|
||||||
if (!empty($this->reply_to)) {
|
if (!empty($this->reply_to)) {
|
||||||
try {
|
try {
|
||||||
$result = $this->message->SetReplyTo($this->getArrayAddress($this->reply_to));
|
$this->message->SetReplyTo($this->getArrayAddress($this->reply_to));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->errors[] = $e->getMessage();
|
$this->errors[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$result = $this->message->setCharSet($conf->file->character_set_client);
|
$this->message->setCharSet($conf->file->character_set_client);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->errors[] = $e->getMessage();
|
$this->errors[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
@ -562,7 +562,11 @@ class CMailFile
|
|||||||
}
|
}
|
||||||
//if (! empty($this->errors_to)) $this->message->setErrorsTo($this->getArrayAddress($this->errors_to));
|
//if (! empty($this->errors_to)) $this->message->setErrorsTo($this->getArrayAddress($this->errors_to));
|
||||||
if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) {
|
if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) {
|
||||||
$this->message->setReadReceiptTo($this->getArrayAddress($this->addr_from));
|
try {
|
||||||
|
$this->message->setReadReceiptTo($this->getArrayAddress($this->addr_from));
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->errors[] = $e->getMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Send mail method not correctly defined
|
// Send mail method not correctly defined
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user