/**
  * Returns a Swift_Message instance that can be sent
  * 
  * @return \Swift_Message
  */
 public function getSwiftMessage()
 {
     $message = new \Swift_Message();
     $message->setDate($this->getDate()->getTimestamp());
     $message->setFrom($this->getFrom());
     $message->setReplyTo($this->getReplyTo());
     $message->setReturnPath($this->getReturnPath());
     $message->setTo($this->getTo());
     $message->setCc($this->getCc());
     $message->setBcc($this->getBcc());
     $message->setSubject($this->getSubject());
     $message->setBody($this->getBody());
     return $message;
 }
Example #2
0
 /**
  * {@inheritdoc}
  *
  * @return $this|self
  */
 public function setDate($date) : self
 {
     $this->message->setDate($date);
     return $this;
 }