Skip to content

[Mailer] JsonException is thrown when calling send() method #32043

@tristanbes

Description

@tristanbes

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy