Sendgrid
SendGrid’s cloud-based email infrastructure relieves businesses of the cost and complexity of maintaining custom email systems. SendGrid provides reliable delivery, scalability and real-time analytics along with flexible API’s that make custom integration a breeze. SendGrid solves the technical challenges, eliminating your email headaches, so that you can focus on your core product and meet the email demands of your business.
StarterFree |
|
Bronze$9.95 per month |
|
Silver$79.95 per month |
|
Gold$199.95 per month |
|
Platinum$399.95 per month |
|
High VolumeContact US |
|
This code snippet assumes you are using bundler and Rails, and deploying to production.
1. Modify your Gemfile
- Add the following lines to your gemfile:
gem 'ey_config'
2. Modify config/environments/production.rb
- Replace "yourdomain.com" below with your application's domain. Or, use
EY::Config.get('base', 'domain_name')
if you've set your domain under "Edit Environment". - For more details, see Sendgrid Documentation.
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.smtp_settings = {
:authentication => :plain,
:address => "smtp.sendgrid.net",
:port => 587,
:domain => "yourdomain.com",
:user_name => EY::Config.get(:sendgrid, 'SENDGRID_USERNAME'),
:password => EY::Config.get(:sendgrid, 'SENDGRID_PASSWORD')
}