diff --git a/README.md b/README.md index adc1d09..2c6d3dd 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,26 @@ heroku config:add MAIL_PORT= heroku config:add TO_EMAIL= ``` +Since the app connects to MAIL_SERVER using the TLS protocol, it's likely that MAIL_PORT will need to be 587. + +### Using gmail as your email server + +Here is an example configuration for using [gmail as the SMTP server](https://support.google.com/a/answer/176600?hl=en): + +``` +MAIL_USERNAME= +MAIL_PASSWORD= +MAIL_SERVER=smtp.gmail.com +MAIL_PORT=587 +TO_EMAIL= +``` + +Note: in order to use gmail, you will have to turn on ["Access for less secure apps"](https://support.google.com/accounts/answer/6010255) for your "from" email. If you are using 2-factor authentication, you may also have to create an [App Password](https://support.google.com/accounts/answer/185834?hl=en#ASPs). See [this gmail help page](https://support.google.com/mail/answer/14257?rd=1) for solutions to other problems you may encounter. + +### Testing your email configuration + +Regardless of what you're using for an SMTP server, you can test your email setup by running `python test.py`. If you see "OK" at the end of the output, you're good to go. + ## Step 4: Check it out! Run ```heroku open``` to see your snazzy new site in a web browser :)