Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/utility/email_send.php
Show First 20 Lines • Show All 1207 Lines • ▼ Show 20 Line(s) | |||||
'attachments' => Array (), | 'attachments' => Array (), | ||||
'inline_attachments' => Array (), | 'inline_attachments' => Array (), | ||||
'text_part' => false, | 'text_part' => false, | ||||
'html_part' => false, | 'html_part' => false, | ||||
); | ); | ||||
$this->SetCharset(null, true); | $this->SetCharset(null, true); | ||||
$this->_logData = Array (); | $this->_logData = Array (); | ||||
$this->Application->removeObject('email-log'); | |||||
} | } | ||||
/** | /** | ||||
* Sends message via php mail function | * Sends message via php mail function | ||||
* | * | ||||
* @param Array $message_headers | * @param Array $message_headers | ||||
* @param string $body | * @param string $body | ||||
* | * | ||||
▲ Show 20 Lines • Show All 903 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
if ( $composed ) { | if ( $composed ) { | ||||
if ( $immediate_send === true ) { | if ( $immediate_send === true ) { | ||||
$send_method = 'Send' . $this->sendMethod; | $send_method = 'Send' . $this->sendMethod; | ||||
$result = $this->$send_method($message_headers, $message_body); | $result = $this->$send_method($message_headers, $message_body); | ||||
if ( $result && $this->_logData ) { | if ( $result && $this->_logData ) { | ||||
// add e-mail log record | /** @var kDBItem $email_log */ | ||||
$this->Conn->doInsert($this->_logData, TABLE_PREFIX . 'EmailLog'); | $email_log = $this->Application->recallObject( | ||||
'email-log', | |||||
null, | |||||
array('skip_autoload' => true) | |||||
); | |||||
$email_log->Clear(); | |||||
$email_log->SetDBFieldsFromHash($this->_logData); | |||||
$email_log->UpdateFormattersSubFields(); | |||||
$email_log->Create(); | |||||
} | } | ||||
if ( $immediate_clear ) { | if ( $immediate_clear ) { | ||||
$this->Clear(); | $this->Clear(); | ||||
} | } | ||||
return $result; | return $result; | ||||
} | } | ||||
Show All 37 Lines |