I have successfully configure my symfony webapp to sending email using SMTP. But all my sending email are being put into the spool
directory.
This should only occurs whem there is an error in the sending. Is that correct?
But if I execute the command swiftmailer:spool:send --env=prod
, all my emails are sending correctly.
Why my server are not sending the email immediately? Is that because I fixed an error? Is there any way to fix this?
swiftmailer:
spool:
type: file
path: %kernel.root_dir%/spool
A just add the command swiftmailer:spool:send
into crontab
. This step wasn't clear on Symfony documentation.