Skip to content

Make it easier to use multiple mailers #33874

Closed
@javiereguiluz

Description

@javiereguiluz

Description
In #33409 it's explained that you need to do this to select the transport to use to send the email message:

// use the first "main" transport
$mailer->send($email);

// or use the "important" one
$email->getHeaders()->addTextHeader('X-Transport', 'important');
$mailer->send($email);

That doesn't look very user friendly 😐 Could we make it easier to use? Maybe like using multiple SwiftMailer mailers in Symfony apps? (Maybe that's already the case and we just need to document it?) Or maybe add another argument to send() method or add another method to select the transport?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions