本文整理汇总了PHP中Horde::getMailerConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP Horde::getMailerConfig方法的具体用法?PHP Horde::getMailerConfig怎么用?PHP Horde::getMailerConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Horde
的用法示例。
在下文中一共展示了Horde::getMailerConfig方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _mail
/**
*
* @global <type> $conf
* @param <type> $story_part
* @param <type> $from
* @param <type> $recipients
* @param <type> $subject
* @param <type> $note
* @return <type>
*/
function _mail($story_part, $from, $recipients, $subject, $note)
{
throw new Jonah_Exception('Needs refactoring.');
global $conf;
/* Create the MIME message. */
$mail = new Horde_Mime_Mail(array('Subject' => $subject, 'To' => $recipients, 'From' => $from, 'User-Agent' => 'Jonah ' . $GLOBALS['registry']->getVersion()));
/* If a note has been provided, add it to the message as a text part. */
if (strlen($note) > 0) {
$message_note = new MIME_Part('text/plain', null, 'UTF-8');
$message_note->setContents($message_note->replaceEOL($note));
$message_note->setDescription(_("Note"));
$mail->addMIMEPart($message_note);
}
/* Get the story as a MIME part and add it to our message. */
$mail->addMIMEPart($story_part);
/* Log the pending outbound message. */
Horde::log(sprintf('<%s> is sending "%s" to (%s)', $from, $subject, $recipients), 'INFO');
/* Send the message and return the result. */
return $mail->send(Horde::getMailerConfig());
}