Action mailer SMTP google apps

后端 未结 2 2021
半阙折子戏
半阙折子戏 2021-01-12 12:59

I tried to configure actionmailer to send via google apps with smtp.

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:add         


        
2条回答
  •  不思量自难忘°
    2021-01-12 13:14

    It works now, I think the problem was with the username. it needs the domain in the username. i.e. the problem was

    user_name: 'username'
    

    Whereas the correct way (at least for google apps) is

    user_name : 'username@mydomain.com'
    

提交回复
热议问题