Reputation: 6062
I want emails sent by my web app to be sent immediately. However, no matter what I try to do, emails keep getting spooled by the system. My app/config/config.yml
:
# Swiftmailer Configuration
swiftmailer:
transport: '%mailer_transport%'
host: '%mailer_host%'
When I add spool: { type: memory }
to the config, the spool isn't sent upon kernel termination as it says in the docs. Is there a way to force immediate delivery?
Upvotes: 0
Views: 706
Reputation: 6062
Had to clear the cache.
$ bin/console cache:clear --env=prod
Upvotes: 0
Reputation: 29932
If you don't specify something else in the config, mails are sent immediatly and not spooled.
You can check it out on the guide
The default behavior of the Symfony mailer is to send the email messages immediately. You may, however, want to avoid the performance hit of the communication to the email server, which could cause the user to wait for the next page to load while the email is sending.
Simply omit the spool
part in the configuration and it should be fine.
If the email does not be sent out, maybe, you have errors in the email server or somewhere else not related directly with Swift mailer.
Upvotes: 1