Skip to content

[Mailer] Can create many mailers like in SwiftMailer #32535

@michaljusiega

Description

@michaljusiega

Description
Hello all,
the new Mailer component released in 4.3 is to replace the SwiftMailer component. Everything works as it should. I have a huge project that connects to many databases, many REST servers and many SMTP servers. Traditionally, according to the documentation, I use SwiftMailer to send e-mails and it looks like this:

swiftmailer:
    default_mailer: mailerone
    mailers:
        mailerone:
            transport: '%mailer_one_transport_protocol%'
            host:      '%mailer_one_transport_host%'
            username:  '%mailer_one_transport_user%'
            password:  '%mailer_one_transport_password%'
            spool: { type: memory }
            logging:   '%kernel.debug%'
        mailersecond:
            transport: '%mailer_second_transport_protocol%'
            host:      '%mailer_second_transport_host%'
            username:  '%mailer_second_transport_user%'
            password:  '%mailer_second_transport_password%'
            spool: { type: memory }
            logging:   '%kernel.debug%'
        mailerthird:
            transport: '%mailer_third_transport_protocol%'
            host:      '%mailer_third_transport_host%'
            username:  '%mailer_third_transport_user%'
            password:  '%mailer_third_transport_password%'
            spool: { type: memory }
            logging:   '%kernel.debug%'
        mailerfourth:
            transport: '%mailer_fourth_transport_protocol%'
            host:      '%mailer_fourth_transport_host%'
            username:  '%mailer_fourth_transport_user%'
            password:  '%mailer_fourth_transport_password%'
            spool: { type: memory }
            logging:   '%kernel.debug%'

Unfortunately, I can not transform the implementation into a new component because it lacks the declaration of many Transports...

framework:
    mailer:
        dsn: '%env(MAILER_DSN)%'

Example
I do not know if this is a good idea, but I think many people also have or will have a similar problem.

framework:
    mailer:
        default_mailer: mailerone
        mailers:
            mailerone: '%env(MAILER_ONE_DSN)%'
            mailersecond: '%env(MAILER_SECOND_DSN)%'

Sorry for my english, is so bad. Thank you for reading my problem and at the same time suggesting adding functionality (actually, in my opinion huge).

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