-
Symfony version(s) affected5.4.38 DescriptionI'm trying to switch from swiftMailer to symfony/mailer used as external library ( I don't use symfony) Everything works well except when I send html manipulated with
When I pass the If I send row html (with no Thanks in advance, How to reproduce
Possible SolutionNo response Additional ContextI know |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
By the way, it seems I get a similar result when using https://github.com/voku/simple_html_dom |
Beta Was this translation helpful? Give feedback.
-
For your information, a workaround is to cast variable to string This generates an error : $message = (new Email())
->from(new Address($from, $fromname))
->subject($email['subject'])
->text($email['txt_body'])
->html($email['html_body']); and this works : $message = (new Email())
->from(new Address($from, $fromname))
->subject($email['subject'])
->text($email['txt_body'])
->html((string) $email['html_body']); |
Beta Was this translation helpful? Give feedback.
-
The question is : should symfony/mailer try to cast the passed variable itself ? |
Beta Was this translation helpful? Give feedback.
For your information, a workaround is to cast variable to string
This generates an error :
and this works :