问题
I want to intercept all email send by Symfony2.
I configure swiftmailer like that:
swiftmailer:
delivery_address: my@gmail.com #My gmail addr
transport: gmail
username: my@gmail.com#I use my gmail for easy smtp configuration (just for dev)
password: mypassword
I receive no emails. I'm developping on Windows10 and i use Wamp.
回答1:
I guess you in dev mode, so you need to do this in you config_dev file:
# app/config/config_dev.yml
swiftmailer:
disable_delivery: false
delivery_address: dev@example.com
回答2:
I guess you put your conf in config.yml file. You have to check in config_prod and config_dev if the "delevery_address" param is not overidden.
来源:https://stackoverflow.com/questions/32121424/symfony2-send-mail-to-gmail