- Issue created by @mandclu
- last update
almost 2 years ago PHPLint Failed - @mandclu opened merge request.
- Status changed to Needs review
almost 2 years ago 10:20am 24 June 2023 - πΊπΈUnited States zengenuity
Do we really want to copy all the parameters to the top level? I think maybe we should just do the headers. That's the only thing that is missing with symfony mailer module. It's not adding its headers to the main part of the message array, which means we can't show them on the preview page. It's not adding them in params either, but at least the requested headers from the module that sent the email are there. We'll still be missing the default headers, since symfony mailer manages those internally, it seems. In any case, I'm not sure that all the other variables in params are appropriate to copy up. Swiftmailer did not do that, nor does symfony mailer lite, so this would be introducing new functionality here in the preview, rather than trying to fill in missing information.
- π¨π¦Canada mandclu
In my testing, the symfony_mailer module also puts the body and subject information into the params array, as well as some other variables which don't appear to be immediately necessary for preview function (which I was working on when I cam across this inconsistency).
Here's a looking at the $message array when using symfony_mailer:
Compare that with the $message array when using symfony_mailer_lite:
- πΊπΈUnited States zengenuity
Oh, okay. I see that the other parameters are there. I didn't think they were. Okay, this is good to merge, then, I think.
- Open on Drupal.org βCore: 9.5.x + Environment: PHP 8.1 & MySQL 8last update
almost 2 years ago Waiting for branch to pass -
mandclu β
committed 1fa369d3 on 2.1.x
Issue #3369746 by mandclu: Normalize for Symfony Mailer's nested data...
-
mandclu β
committed 1fa369d3 on 2.1.x
- Status changed to Fixed
almost 2 years ago 2:36pm 24 June 2023 - π¨π¦Canada mandclu
Thanks, merged in. One other note is that I also encountered a situation where symfony_mailer had provided the body as a render array instead of a string of markup, so this code also includes a check for this and will render an array if it encounters one. Not sure if that's something that should be moved upstream to the service code that generates the $message array.
Automatically closed - issue fixed for 2 weeks with no activity.