Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a contact page form that is setup to send an email to a Gmail account. Only problem is it won't send. I believe I have narrowed the error down to my settings inside of the initializers directory.

These are my current settings for trying to setup a standard gmail account to send mail: enter image description here

Could it be that my domain setting is wrong or should I be typing in myemail@gmail.com for :user_name? This is the first time I have used ActionMailer so I don't really know what I am doing. Can somebody please help me out!? Thanks!

question from:https://stackoverflow.com/questions/4929680/setting-up-a-gmail-account-to-work-with-actionmailer-in-rails-3

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
152 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you are using the development environment, change the development.rb to raise delivery errors, with config.action_mailer.raise_delivery_errors = true

Also, the problem might be that :user_name should be the entire email address (myemail@gmail.com), that's how Gmail authenticates users.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...