Add instructions for how to turn on SendGrid

Instructions like these are necessary to prevent developers from
wondering why their emails aren't getting sent.
This commit is contained in:
LucasCioffi
2019-07-21 07:55:23 -04:00
committed by Javi Martín
parent 0d11301602
commit 92446306ab
2 changed files with 40 additions and 0 deletions

View File

@@ -107,6 +107,26 @@ This tutorial assumes that you have already managed to clone CONSUL on your mach
See [our S3 guide](./using-aws-s3-as-storage.md) for more details about configuring Paperclip with S3.
### Configure Sendgrid
Add the SendGrid add-on in Heroku. It will create a SendGrid account for you with `ENV["SENDGRID_USERNAME"]` and `ENV["SENDGRID_PASSWORD"]`.
Add this to `config/secrets.yml`, under the `production:` section:
```
mailer_delivery_method: :smtp
smtp_settings:
:address: "smtp.sendgrid.net"
:port: 587
:domain: "heroku.com"
:user_name: ENV["SENDGRID_USERNAME"]
:password: ENV["SENDGRID_PASSWORD"]
:authentication: "plain"
:enable_starttls_auto: true
```
Important: Turn on one worker dyno so that emails get sent.
## Optional but recommended:
### Install rails\_12factor and specify the Ruby version