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


PHP Swift_Message::getSender方法代码示例

本文整理汇总了PHP中Swift_Message::getSender方法的典型用法代码示例。如果您正苦于以下问题:PHP Swift_Message::getSender方法的具体用法?PHP Swift_Message::getSender怎么用?PHP Swift_Message::getSender使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Swift_Message的用法示例。


在下文中一共展示了Swift_Message::getSender方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createFromSwiftMessage

 /**
  * Creates a DmSentMail from a Swift_Message
  * @param Swift_Message $message
  * @return DmSentMail
  */
 public function createFromSwiftMessage(Swift_Message $message)
 {
     $debug = $message->toString();
     if ($attachementPosition = strpos($debug, 'attachment; filename=')) {
         $debug = substr($debug, 0, $attachementPosition);
     }
     return $this->create(array('subject' => $message->getSubject(), 'body' => $message->getBody(), 'from_email' => implode(', ', array_keys((array) $message->getFrom())), 'to_email' => implode(', ', array_keys((array) $message->getTo())), 'cc_email' => implode(', ', array_keys((array) $message->getCC())), 'bcc_email' => implode(', ', array_keys((array) $message->getBCC())), 'reply_to_email' => implode(', ', array_keys((array) $message->getReplyTo())), 'sender_email' => implode(', ', array_keys((array) $message->getSender())), 'debug_string' => $debug));
 }
开发者ID:theolymp,项目名称:diem,代码行数:13,代码来源:PluginDmSentMailTable.class.php

示例2: logSwiftmailMessage

 /**
  * PHPWS_Email has a built-in simple logging function.  This replicates
  * the functionality of that function for SwiftMail.
  */
 public static function logSwiftmailMessage(Swift_Message $message)
 {
     $id = 'id:' . $message->getId();
     $from = 'from:' . $message->getSender();
     $to = 'to:' . implode(',', array_keys($message->getTo()));
     // Optional fields, If the message has them, implode the arrays to simple strings.
     $cc = $message->getCc() != null ? 'cc:' . implode(',', array_keys($message->getCc())) : '';
     $bcc = $message->getBcc() != null ? 'bcc:' . implode(',', array_keys($message->getBcc())) : '';
     $replyto = $message->getReplyTo() != null ? 'reply-to:' . implode(',', array_keys($message->getReplyTo())) : '';
     $subject = 'subject:' . $message->getSubject();
     $module = 'module:' . PHPWS_Core::getCurrentModule();
     $user = 'user:' . (Current_User::isLogged() ? Current_User::getUsername() : '');
     PHPWS_Core::log("{$id} {$module} {$user} {$subject} {$from} {$to} {$cc} {$bcc} {$replyto}", 'phpws-mail.log', 'mail');
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:18,代码来源:HMS_Email.php

示例3: getSender

 /**
  * Return the person who sent the message.
  *
  * @return Email
  */
 public function getSender()
 {
     return new Email($this->message->getSender());
 }
开发者ID:Webiny,项目名称:Framework,代码行数:9,代码来源:Message.php

示例4: getSender

 /**
  * {@inheritdoc}
  */
 public function getSender()
 {
     return $this->message->getSender();
 }
开发者ID:cawaphp,项目名称:email,代码行数:7,代码来源:Message.php

示例5: createFromSwiftMessage

 /**
  * Creates a DmSentMail from a Swift_Message
  * @param Swift_Message $message
  * @return DmSentMail
  */
 public function createFromSwiftMessage(Swift_Message $message)
 {
     return $this->create(array('subject' => $message->getSubject(), 'body' => $message->getBody(), 'from_email' => implode(', ', array_keys((array) $message->getFrom())), 'to_email' => implode(', ', array_keys((array) $message->getTo())), 'cc_email' => implode(', ', array_keys((array) $message->getCC())), 'bcc_email' => implode(', ', array_keys((array) $message->getBCC())), 'reply_to_email' => $message->getReplyTo(), 'sender_email' => $message->getSender(), 'debug_string' => $message->toString()));
 }
开发者ID:jdart,项目名称:diem,代码行数:9,代码来源:PluginDmSentMailTable.class.php


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