Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

How to define custom mailtransport #308

Closed
jeff1985 opened this issue Jan 19, 2021 · 1 comment
Closed

How to define custom mailtransport #308

jeff1985 opened this issue Jan 19, 2021 · 1 comment

Comments

@jeff1985
Copy link

I'm trying to write a custom mail transport but it seems that this is not possible in the newer versions of this bundle.

When I try to define it in the config like this:

swiftmailer:
    url: '%env(MAILER_URL)%'
    spool: { type: 'memory' }
    transport: 'queue'

and in services.yaml

swiftmailer.mailer.transport.queue:
      class: App\Email\EmailQueueTransport

I see:

In SwiftmailerTransportFactory.php line 71:

  Not a built-in Swiftmailer transport: queue.

If found this issue, #298 which is similar but has been closed because of reference to other library. Also I found a similar issue in mailjet/MailjetSwiftMailer#24
It is similar to my case, however I have my own transport implementation, which I try to configure.

Is it generally possible to configure custom mailtransport with this bundle? And if so, is there any documentation about this?

@OskarStark
Copy link

Hi Jeff,

am I allowed to ask which transport do you want to implement? Did you checked symfony/mailer instead of SwiftMailer? It is the newer mailer approach we use in Symfony and it also has a lot of working transports on Board 👍🏻

@fabpot fabpot closed this as completed Feb 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants