mirror of
https://github.com/e107inc/e107.git
synced 2025-08-11 09:04:38 +02:00
Standard mailer and bulk mailer can now be different. eg. Use PHP for standard mails, but use Amazon.com SES service for bulk mailing, mailing lists etc.
This commit is contained in:
@@ -216,9 +216,19 @@ class e107MailManager
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($overrides = FALSE)
|
||||
public function __construct($overrides = false)
|
||||
{
|
||||
$this->e107 = e107::getInstance();
|
||||
|
||||
$pref = e107::pref('core');
|
||||
|
||||
$bulkmailer = (!empty($pref['bulkmailer'])) ? $pref['bulkmailer'] : $pref['mailer'];
|
||||
|
||||
if($overrides === false)
|
||||
{
|
||||
$overrides = array('mailer'=>$bulkmailer);
|
||||
}
|
||||
|
||||
$this->mailOverrides = $overrides;
|
||||
|
||||
if(deftrue('e_DEBUG'))
|
||||
@@ -247,7 +257,7 @@ class e107MailManager
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function mailToDb(&$data, $addMissing = FALSE)
|
||||
public function mailToDb(&$data, $addMissing = false)
|
||||
{
|
||||
$res = array();
|
||||
$res1 = array();
|
||||
@@ -745,10 +755,9 @@ class e107MailManager
|
||||
|
||||
}
|
||||
|
||||
// else
|
||||
{
|
||||
$result = $this->mailer->sendEmail($email['mail_recipient_email'], $email['mail_recipient_name'], $mailToSend, TRUE);
|
||||
}
|
||||
|
||||
$result = $this->mailer->sendEmail($email['mail_recipient_email'], $email['mail_recipient_name'], $mailToSend, TRUE);
|
||||
|
||||
|
||||
if($this->debugMode)
|
||||
{
|
||||
@@ -1310,7 +1319,7 @@ class e107MailManager
|
||||
|
||||
if (!$this->db->update('mail_content',$query))
|
||||
{
|
||||
$this->e107->admin_log->e_log_event(10,-1,'MAIL','Activate/hold mail','mail_content: '.$query.'[!br!]Fail: '.$this->db->mySQLlastErrText,FALSE,LOG_TO_ROLLING);
|
||||
e107::getLog()->e_log_event(10,-1,'MAIL','Activate/hold mail','mail_content: '.$query.'[!br!]Fail: '.$this->db->mySQLlastErrText,FALSE,LOG_TO_ROLLING);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1319,7 +1328,7 @@ class e107MailManager
|
||||
// echo "Update individual emails: {$query}<br />";
|
||||
if (FALSE === $this->db->update('mail_recipients',$query))
|
||||
{
|
||||
$this->e107->admin_log->e_log_event(10,-1,'MAIL','Activate/hold mail','mail_recipient: '.$query.'[!br!]Fail: '.$this->db->mySQLlastErrText,FALSE,LOG_TO_ROLLING);
|
||||
e107::getLog()->e_log_event(10,-1,'MAIL','Activate/hold mail','mail_recipient: '.$query.'[!br!]Fail: '.$this->db->mySQLlastErrText,FALSE,LOG_TO_ROLLING);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user