Changeset View
Changeset View
Standalone View
Standalone View
branches/5.3.x/core/kernel/utility/email.php
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
return $ret; | return $ret; | ||||
} | } | ||||
/** | /** | ||||
* Sends e-mail now or puts it in queue | * Sends e-mail now or puts it in queue | ||||
* | * | ||||
* @param int $recipient_user_id | * @param integer $recipient_user_id Recipient user id. | ||||
* @return bool | * @param boolean $immediate_send Immediate send. | ||||
* @access public | * | ||||
* @return boolean | |||||
*/ | */ | ||||
public function send($recipient_user_id = null) | public function send($recipient_user_id = null, $immediate_send = null) | ||||
{ | { | ||||
$this->recipientUserId = $recipient_user_id; | $this->recipientUserId = $recipient_user_id; | ||||
$this->_resetState(); | $this->_resetState(); | ||||
$this->_processSender(); | $this->_processSender(); | ||||
$this->_processRecipients(); | $this->_processRecipients(); | ||||
$this->_changeLanguage(false); | $this->_changeLanguage(false); | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | |||||
if ( $this->_storeEmailLog() ) { | if ( $this->_storeEmailLog() ) { | ||||
// 4. set log | // 4. set log | ||||
$this->logData['HtmlBody'] = $html_message_body; | $this->logData['HtmlBody'] = $html_message_body; | ||||
$this->logData['TextBody'] = $plain_message_body; | $this->logData['TextBody'] = $plain_message_body; | ||||
$this->logData['AccessKey'] = $this->params['email_access_key']; | $this->logData['AccessKey'] = $this->params['email_access_key']; | ||||
$this->sender->setLogData($this->logData); | $this->sender->setLogData($this->logData); | ||||
} | } | ||||
$delivery = isset($this->params['delivery']) ? $this->params['delivery'] : $this->Application->ConfigValue('EmailDelivery'); | if ( !isset($immediate_send) ) { | ||||
if ( isset($this->params['delivery']) ) { | |||||
$delivery = $this->params['delivery']; | |||||
} | |||||
else { | |||||
$delivery = $this->Application->ConfigValue('EmailDelivery'); | |||||
} | |||||
$immediate_send = $delivery == EmailDelivery::IMMEDIATE; | |||||
} | |||||
return $this->sender->Deliver(null, $delivery == EmailDelivery::IMMEDIATE); | return $this->sender->Deliver(null, $immediate_send); | ||||
} | } | ||||
/** | /** | ||||
* Extracts prefix from a given PrefixSpecial parameter. | * Extracts prefix from a given PrefixSpecial parameter. | ||||
* | * | ||||
* @return string | * @return string | ||||
*/ | */ | ||||
protected function getItemPrefix() | protected function getItemPrefix() | ||||
▲ Show 20 Lines • Show All 649 Lines • Show Last 20 Lines |