本文整理汇总了PHP中Cake\Mailer\Email::getOriginalSubject方法的典型用法代码示例。如果您正苦于以下问题:PHP Email::getOriginalSubject方法的具体用法?PHP Email::getOriginalSubject怎么用?PHP Email::getOriginalSubject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cake\Mailer\Email
的用法示例。
在下文中一共展示了Email::getOriginalSubject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: send
/**
* Send mail
*
* @param \Cake\Mailer\Email $email Email
* @return array
*/
public function send(Email $email)
{
if (!empty($this->_config['queue'])) {
$this->_config = $this->_config['queue'] + $this->_config;
$email->config((array) $this->_config['queue'] + ['queue' => []]);
unset($this->_config['queue']);
}
$settings = ['from' => [$email->from()], 'to' => [$email->to()], 'cc' => [$email->cc()], 'bcc' => [$email->bcc()], 'charset' => [$email->charset()], 'replyTo' => [$email->replyTo()], 'readReceipt' => [$email->readReceipt()], 'returnPath' => [$email->returnPath()], 'messageId' => [$email->messageId()], 'domain' => [$email->domain()], 'getHeaders' => [$email->getHeaders()], 'headerCharset' => [$email->headerCharset()], 'theme' => [$email->theme()], 'profile' => [$email->profile()], 'emailFormat' => [$email->emailFormat()], 'subject' => [$email->getOriginalSubject()], 'transport' => [$this->_config['transport']], 'attachments' => [$email->attachments()], 'template' => $email->template(), 'viewVars' => [$email->viewVars()]];
foreach ($settings as $setting => $value) {
if (array_key_exists(0, $value) && ($value[0] === null || $value[0] === [])) {
unset($settings[$setting]);
}
}
$QueuedTasks = TableRegistry::get('Queue.QueuedTasks');
$result = $QueuedTasks->createJob('Email', ['settings' => $settings]);
$result['headers'] = '';
$result['message'] = '';
return $result;
}