Amazon
SES
Amazon
Simple Email Service (Amazon SES) is a cost-effective outbound-only
email-sending service built on the reliable and scalable
infrastructure that Amazon.com has developed to serve its own
customer base. With Amazon SES, you can send transactional email,
marketing messages, or any other type of high-quality content and you
only pay for what you use.
Along
with high deliver-ability, Amazon SES provides easy, real-time access
to your sending statistics and built-in notifications for bounces and
complaints to help you fine-tune your email-sending strategy.
Steps
to set up Amazon SES in rails:-
1.
Make an account on amazon services. www.amazon.com
2.
Go to the link
https://console.aws.amazon.com/ses/home#smtp-settings:
and
click on button “create my smtp creds” and it will return a
username and password
which
we will use in our smtp settings
3.
Now in config/applicaiton.rb
config.action_mailer.delivery_method
= :smtp
config.action_mailer.default_url_options
= { :host => 'localhost:3000'}
config.action_mailer.smtp_settings =
{
:address =>
'email-smtp.us-east-1.amazonaws.com',
:port => '25',
:domain => 'localhost:3000',
# Your domain
:user_name =>
'************************’',
:password =>
'******************************************',
:authentication => :login,
:enable_starttls_auto => true
}
Domain
will be changed according the server(like for production environment
it will be production URL).
4.
And we will start sending email,
The
‘Sender’ person should be verified by aws-ses.
and The user from in application will be the verified user.
https://console.aws.amazon.com/ses/home#verified-senders-email:
5.
The email sending procedure will be same as we use default behavior
of action mailer but now the email will sent using Amazon SES.
No comments:
Post a Comment