8000 mailer.envelope.sender / mailer.headers.from not working · Issue #44123 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
mailer.envelope.sender / mailer.headers.from not working #44123
Closed
@ricohumme

Description

@ricohumme

Symfony version(s) affected

5.3.10

Description

Hi,
I just found that when working in dev mode these keys are not used to alter the message being sent.

in my dev/mailer.yaml I used the following config

framework:
    mailer:
        envelope:
            sender: 'my@email.com'
            recipients: [ 'my@email.com' ]
        headers:
            from: 'Development <my@email.com>'

This resulted in the mail actually being sent to my email address, but the rest of the values (sender, from) remained untouched.
I received the mail with the values I passed when creating the object.
Did anyone else encounter this already?

How to reproduce

$mail = new TemplatedEmail();
$mail->from(new Address('some@email.com', 'A name'))
    ->to(new Address('other@email.com', 'Another name'))
    ->subject('Test email')
    ->text('Some content here');
$this->mailer->send($mail);

Possible Solution

No response

Additional Context

No response

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

      0