Skip to content

Instantly share code, notes, and snippets.

@hendrikbeck
Created September 30, 2013 05:29
Show Gist options
  • Save hendrikbeck/6759674 to your computer and use it in GitHub Desktop.
Save hendrikbeck/6759674 to your computer and use it in GitHub Desktop.
Email Configuration for Amazon SES in Ruby on Rails
ActionMailer::Base.smtp_settings = {
:address => 'email-smtp.us-east-1.amazonaws.com',
:port => 25,
:authentication => 'login',
# The following 2 of course shouldn't be in here. When you open SES on the AWS Mangaement Console, they
# provide a link to create STMP users within Amazon. Just follow that and you'll get username and password.
:user_name => ENV['EMAIL_USERNAME'],
:password => ENV['EMAIL_PASSWORD'],
:domain => 'mysquar.com',
:enable_starttls_auto => true
}
class XyzMailer < ActionMailer::Base
default from: "SQUAR <noreply@mysquar.com>"
(...)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment