I am trying to send an email using SwiftMailer bundle on Symfony. I am able to send a mail through the command :
swiftmailer:email:send
From: myemail
To: emailRecipient
Subject: Hi
Body: This is a test
Sent 1 emails
Done.
After submitting my form, I would like to send my email. I can see them on my production server :
/home/sga/www/app/spool/default
So I tried to send them using :
swiftmailer:spool:send --env=prod
Finally I get :
Processing default mailer... 0 emails sent
Done.
swiftmailer:debug"
[swiftmailer] Current mailers
Name Transport Spool Delivery Single Address
default (default mailer) smtp YES YES
My config.yml file :
# Swiftmailer Configuration
swiftmailer:
transport: smtp
host: myhost
username: ~
password: ~
spool:
type: file
path: "%kernel.root_dir%/spool"
I don't know why no emails are sent...
%kernel.root_dir%/spool
? Maaybe this is a file permissions issue, your application just cannot write into this file? – Vera