Deployment
Sending out Emails
Learn how to send transactional emails from your Spree application.
Spree uses ActionMailer to send transactional emails (eg. order confirmation, password reset, etc.) under the hood. You can use any SMTP server to send emails from your application. For production use we recommend using a service like SendGrid.
Configuring SendGrid
Spree Starter comes with SendGrid pre-configured out of the box and you will need to set the following environment variables:
SENDGRID_API_KEY
- Your SendGrid API key. Can be found in the SendGrid dashboard.SENDGRID_DOMAIN
- The domain you want to use for sending emails that was verified in SendGrid, eg.mystore.com
.
If you’re not using Spree Starter you will need to add these code in your config/environments/production.rb
file:
That’s it! You can now send emails from your application.