Example #1
0
 /**
  * @param \Generated\Shared\Transfer\MailTransfer $mailTransfer
  *
  * @return array
  */
 protected function extractMessage(MailTransfer $mailTransfer)
 {
     return ['subject' => $mailTransfer->getSubject(), 'from_email' => $mailTransfer->getFromEmail(), 'from_name' => $mailTransfer->getFromName(), 'to' => $this->extractRecipients($mailTransfer->getRecipients()), 'headers' => $this->extractHeaders($mailTransfer->getHeaders()), 'important' => $mailTransfer->getImportant(), 'track_opens' => $mailTransfer->getTrackOpens(), 'track_clicks' => $mailTransfer->getTrackClicks(), 'auto_text' => $mailTransfer->getAutoText(), 'auto_html' => $mailTransfer->getAutoHtml(), 'inline_css' => $mailTransfer->getInlineCss(), 'url_strip_qs' => $mailTransfer->getUrlStripQueryString(), 'preserve_recipients' => $mailTransfer->getPreserveRecipients(), 'view_content_link' => $mailTransfer->getViewContentLink(), 'bcc_address' => $mailTransfer->getBccAddress(), 'tracking_domain' => $mailTransfer->getTrackingDomain(), 'signing_domain' => $mailTransfer->getSigningDomain(), 'return_path_domain' => $mailTransfer->getReturnPathDomain(), 'merge' => $mailTransfer->getMerge(), 'merge_language' => $mailTransfer->getMergeLanguage(), 'global_merge_vars' => $this->convertToJsonStyle($mailTransfer->getGlobalMergeVars()), 'merge_vars' => $this->extractMergeVars($mailTransfer->getRecipients()), 'tags' => $mailTransfer->getTags(), 'subaccount' => $mailTransfer->getSubAccount(), 'google_analytics_domains' => $mailTransfer->getGoogleAnalyticsDomains(), 'google_analytics_campaign' => $mailTransfer->getGoogleAnalyticsCampaign(), 'metadata' => $mailTransfer->getMetadata(), 'recipient_metadata' => $this->extractRecipientMetadata($mailTransfer->getRecipients()), 'attachments' => $this->extractFiles($mailTransfer->getAttachments()), 'images' => $this->extractFiles($mailTransfer->getImages())];
 }