The following snippets are a working example of setting up 
ActionMailer/Devise using a domain email account hosted on Google Apps with 
Rails 4.2/Ruby 2.2.1. This is different than using regular Gmail account 
which only requires you to go into the account settings and turn on "Access 
for less secure apps". This setting isn't available for the former. You 
must use SSL instead.

>From development.rb:
  # Devise configuration settings
  config.action_mailer.default_url_options = { :host => 'localhost:3000'}
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true

>From setup_mail.rb:
ActionMailer::Base.smtp_settings = {   :address        => 'smtp.gmail.com', 
  :port           => '465',   :authentication => 'plain',   :user_name     
 => 'exam...@example.com',   :password       => 'yourpassword',   :domain   
      => 'yourdom...@example.com',   :ssl            => true }

This is a great video tutorial on setting up devise:
https://www.youtube.com/watch?v=YnGuALpJN1M

Respectfully,

Cody Skidmore

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/ad767203-f3a0-45ac-b4ab-f86af5815c69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to