当前位置: 首页>>代码示例>>PHP>>正文


PHP Mailer::sendPlain方法代码示例

本文整理汇总了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;
 }
开发者ID:helpfulrobot,项目名称:micschk-silverstripe-mailer-mailgun,代码行数:15,代码来源:PostmarkMailer.php

示例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}");
     }
 }
开发者ID:richardmiller,项目名称:loggingmailer,代码行数:14,代码来源:LoggingMailer.php

示例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;
 }
开发者ID:Neumes,项目名称:silverstripe-mailcapture,代码行数:25,代码来源:CaptureMailer.php

示例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']);
 }
开发者ID:signify-nz,项目名称:silverstripe-mailblock,代码行数:16,代码来源:MailblockMailer.php


注:本文中的Mailer::sendPlain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。