Problem/Motivation

Using 1.1.0-beta2 version
I have functionallity to preview emails before it's send. With old mailer, after calling mail() method with prameter "send" to FALSE, i got still get rendered body in message array. Now using symfony mailer we get return boolean and no content. I need to get email body and not actually send mail.

There is a method in MailManagerReplacement class mail() and there LegacyHelper->emailToArray() is called. That method should set, as I understand, extra message parameters like body and headers. But emailToArray doesn't take message parameter as reference so message array is actually never updated.

Steps to reproduce

Send mail using mail manager method send(), setting send parameter to FALSE. Returns array with parameters without email content

Proposed resolution

I found way to get body of email without sending it, bet I need LegacyHelper->emailToArray() to actually change the message array for that. Now I have seperate email builder which sets transportDsn to "null://default", so email isn't sent. And in my message string I get body if I set LegacyHelper->emailToArray() second argument with reference.

Comments

ugas19 created an issue. See original summary.

ugas19’s picture

adamps’s picture

Status: Active » Needs review
adamps’s picture

Status: Needs review » Reviewed & tested by the community

  • AdamPS committed bf34699 on 1.x
    Issue #3317709 by ugas19: LegacyHelper emailToArray method doesn't save...
adamps’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.