Exemplo n.º 1
0
 /**
  * @return array
  */
 public function parse()
 {
     $eol = "\n";
     $html = "";
     $text = "";
     $htmlPart = $this->message->getBodyHtml();
     if ($htmlPart) {
         $html = $htmlPart->getContent($eol);
     }
     $textPart = $this->message->getBodyText();
     if ($textPart) {
         $text = $textPart->getContent($eol);
     }
     $text = quoted_printable_decode($text);
     $html = quoted_printable_decode($html);
     return ['from' => $this->message->getFrom(), 'reply-to' => $this->message->getReplyTo(), 'subject' => $this->message->getSubject(), 'to' => $this->parseRecipients('To'), 'cc' => $this->parseRecipients('Cc'), 'bcc' => $this->parseRecipients('Bcc'), 'html' => $html ?: null, 'text' => $text ?: null, 'attachment' => []];
 }