本文整理汇总了PHP中Mailer::sendPlain方法的典型用法代码示例。如果您正苦于以下问题:PHP Mailer::sendPlain方法的具体用法?PHP Mailer::sendPlain怎么用?PHP Mailer::sendPlain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mailer
的用法示例。
在下文中一共展示了Mailer::sendPlain方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendPlain
/**
* Send a plain-text email.
*
* @return bool
*/
public function sendPlain($to, $from, $subject, $plainContent, $attachedFiles = false, $customheaders = false)
{
$result = $this->sendPostmarkEmail($to, $from, $subject, false, $attachedFiles, $customheaders, $plainContent);
if ($result === false) {
// Fall back to regular Mailer
$fallbackMailer = new Mailer();
$result = $fallbackMailer->sendPlain($to, $from, $subject, $plainContent, $attachedFiles, $customheaders);
}
return $result;
}
示例2: sendPlain
function sendPlain($to, $from, $subject, $plainContent, $attachedFiles = false, $customheaders = false)
{
if (parent::sendPlain($to, $from, $subject, $plainContent, $attachedFiles = false, $customheaders = false)) {
$log = new MailLog();
$log->To = $to;
$log->From = $from;
$log->Subject = $subject;
$log->Body = $plainContent;
$log->Date = date('Y-m-d H:i:s');
$log->write();
} else {
throw new Exception("Mail not accepted for delivery to {$to}");
}
}
示例3: sendPlain
/**
*/
function sendPlain($to, $from, $subject, $plainContent, $attachedFiles = false, $customHeaders = false)
{
if (self::$capture_emails) {
$mail = new CapturedEmail();
$mail->To = $to;
$mail->From = $from;
$mail->Subject = $subject;
if (is_array($customHeaders)) {
foreach ($customHeaders as $header => $val) {
$mail->Headers .= "{$header}: {$val} \n";
}
}
$mail->PlainText = $plainContent;
if ($this->send) {
$mail->SendID = $this->send->ID;
}
$mail->write();
}
if (self::$outbound_send) {
return parent::sendPlain($to, $from, $subject, $plainContent, $attachedFiles, $customHeaders);
}
return true;
}
示例4: sendPlain
/**
* Send a plain-text email.
*
* @param string $to Email recipient
* @param string $from Email from
* @param string $subject Subject text
* @param string $plainContent Plain text content
* @param array $attachedFiles List of attached files
* @param array $customHeaders List of custom headers
* @return mixed Return false if failure, or list of arguments if success
*/
public function sendPlain($to, $from, $subject, $plainContent, $attachedFiles = array(), $customHeaders = array())
{
$rewrites = $this->mailblockRewrite($to, $subject, $customHeaders);
parent::sendPlain($rewrites['to'], $from, $rewrites['subject'], $plainContent, $attachedFiles, $rewrites['headers']);
}