Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Mailer component and html() call -incompatible with simple_html_dom library ?  #54732

Copy link
Copy link
Closed
@simogeo

Description

@simogeo
Issue body actions

Symfony version(s) affected

5.4.38

Description

I'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 simple_html_dom library, I get the following error :

Fatal error: Uncaught TypeError: The body must be a string, a resource or null (got "simple_html_dom"). in lib/comp-vendor/symfony/mime/Email.php:321 Stack trace: #0 mail/send.php(127): Symfony\Component\Mime\Email->html() #1 plugins/l21_emailSuite/index.php(46): send_email() #2 plugins/index.php(56): include_once('...') #3 templates/admin/2021/index.php(72): include_once('...') #4 admin/index.php(74): include_once('...') #5 {main} thrown in lib/comp-vendor/symfony/mime/Email.php on line 321

When I pass the

If I send row html (with no simple_html_dom library anterior manipulation, I do not experience any issue ... I guesse this is related to mime type ... but I'm stuck. Do you have any clue ?

Thanks in advance,

How to reproduce

  • prepare a mail with html content using symfony/mailer
  • do manipulate html content with simple_html_dom library available at http://sourceforge.net/projects/simplehtmldom/
  • try to send the mail, it will trigger an error similar to the one provided above

Possible Solution

No response

Additional Context

I know simple_html_dom is an old library ! but quite useful ... should symfony/mailer be more permissive ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.