Skip to content

[Mailer][Mailgun] Reply-to header triggers a deprecation #40925

Closed
@akalineskou

Description

@akalineskou

Symfony version(s) affected: 5.2.x

Description
When creating an Email, using replyTo and sending it with Mailgun, a deprecation error is being triggered.
This trigger was added in this PR #36148

How to reproduce

use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mime\Email;

// ...

$email
    ->from($from)
    ->replyTo($replyTo)
    ->to($to)
;

/** @var MailerInterface $mailer */
$mailer->send($email);

The deprecation message is
User Deprecated: Not prefixing the Mailgun header name with "h:" is deprecated since Symfony 5.1. Use header name "h:reply-to" instead.

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