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] JsonException is thrown when calling send() method #32043

Copy link
Copy link
Closed
@tristanbes

Description

@tristanbes
Issue body actions

Symfony version(s) affected: 4.3.1

Description
I'm using the new Symfony Mailer, on a real app production environment some of this issue has happened:

Symfony\Component\HttpClient\Exception\JsonException

Response content-type is "text/html; charset=utf-8" while a JSON-compatible one was expected.

This error has been thrown by $this->mailer->send($email)

I'm also using symfony/mailgun-mailer

How to reproduce
I don't know, sorry :(

Possible Solution
Wrap the $this->mailer->send($email); in a try/catch block, but not sure how this error happens, and how to prevent it, or deal with it.

Additional context
mailer_JsonException

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.