Setting up a Gmail Account to work with ActionMailer in Rails 3

24,905

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 ([email protected]), that's how Gmail authenticates users.

Share:
24,905
ab217
Author by

ab217

Updated on September 27, 2020

Comments

  • ab217
    ab217 over 3 years

    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 [email protected] 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!

  • ab217
    ab217 about 13 years
    I have that enabled, and I have tried using [email protected] in the :user_name field but it never raises an exception when I send it.
  • ab217
    ab217 about 13 years
    I restarted the rails server and used [email protected] and it worked! Thanks a lot!!!