本文整理汇总了PHP中Pluf::pf方法的典型用法代码示例。如果您正苦于以下问题:PHP Pluf::pf方法的具体用法?PHP Pluf::pf怎么用?PHP Pluf::pf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pluf
的用法示例。
在下文中一共展示了Pluf::pf方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendMail
/**
* Effectively sends the email.
*/
function sendMail()
{
if ($this->backend === null) {
$params = Pluf::pf('mail_', true);
// strip the prefix 'mail_'
unset($params['backend']);
$gmail = new Mail();
if (Pluf::f('mail_backend') == 'smtp') {
$params['persist'] = true;
}
$this->backend = $gmail->factory(Pluf::f('mail_backend', 'mail'), $params);
}
$body = $this->message->get();
$hdrs = $this->message->headers($this->headers);
if (Pluf::f('send_emails', true)) {
$this->backend->send($this->headers['To'], $hdrs, $body);
}
$this->message = new Mail_mime($this->crlf);
$this->message->_build_params['html_charset'] = $this->encoding;
$this->message->_build_params['text_charset'] = $this->encoding;
$this->message->_build_params['head_charset'] = $this->encoding;
$this->headers = array('From' => $this->from);
}
示例2: sendMail
/**
* Effectively sends the email.
*/
function sendMail()
{
$body = $this->message->get();
$hdrs = $this->message->headers($this->headers);
$params = Pluf::pf('mail_', true);
// strip the prefix 'mail_'
unset($params['backend']);
$gmail = new Mail();
$mail = $gmail->factory(Pluf::f('mail_backend', 'mail'), $params);
if (Pluf::f('send_emails', true)) {
$mail->send($this->to_address, $hdrs, $body);
}
if (defined('IN_UNIT_TESTS')) {
$GLOBALS['_PX_UNIT_TESTS']['emails'][] = array($this->to_address, $hdrs, $body);
}
}