- Symfony 2.1.x
- FOSUserBundle
- SwiftMailer
I was trying to modify the registration flow in FOSUserBundle to do two things:
- After a user registers, he/she will be logged in automatically (no need to confirm emails)
- Send an email to the user upon successful registration
However, I find that after the user registers, he/she is always redirected to the login page (I want them to be in an authenticated page). If the user refreshes this page (via the refresh button in the browser), they would be logged in.
After numerous hours of debugging, I found that if I turn off the memory spooling option in SwiftMailer, everything would work fine.
In app/config/config.yaml
swiftmailer:If anyone knows why this is happening, please comment below.
transport: %mailer_transport%
encryption: %encryption%
auth_mode: login
host: %mailer_host%
username: %mailer_user%
password: %mailer_password%
#spool: { type: memory }
Hi i have the same problem. Did you found the reason?
ReplyDeleteHi this may help. https://github.com/symfony/symfony/issues/7380
DeleteBut what I have done is to use file spooling instead. It's better to separate the app server and email server anyways.
Ok i have found the real problem - it is described here: https://github.com/symfony/symfony/issues/6417
ReplyDeletemaby it will help you