示例#1
0
 /**
  * Adds body parts to the message.
  *
  * @param Email $notification
  * @param \Swift_Message $email
  * @param string $boundary
  */
 protected function addParts(Email $notification, \Swift_Message $email, $boundary)
 {
     foreach ($notification->getParts() as $part) {
         $mimePart = \Swift_MimePart::newInstance($part->getContent(), $part->getContentType());
         $mimePart->setBoundary($boundary);
         if ($encoder = $this->getEncoder($part)) {
             $mimePart->setEncoder($encoder);
         }
         $email->attach($mimePart);
     }
 }
示例#2
0
 /**
  * Adds body parts to the message.
  *
  * @param Email $notification
  * @param \Swift_Message $email
  */
 protected function addParts(Email $notification, \Swift_Message $email)
 {
     foreach ($notification->getParts() as $part) {
         $email->addPart($part->getContent(), $part->getContentType());
     }
 }