Skip to content

Commit ae373c0

Browse files
authored
Merge pull request #5760 from mozilla/jhermann/update-e2e-local-email-docs
docs (email): update e2e email local testing docs
2 parents d46845d + f91877e commit ae373c0

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/end-to-end-local-email-dev.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ AWS needs to verify you own the domain before it will send its email to you.
6262
2. Go to your domain's DNS and add the new CNAME records with the values that
6363
SES generated for you.
6464

65+
#### Verify emails
66+
67+
If you are using the AWS free trial, you will need to verify any emails you are using. SES in the AWS free tier will only send to verified emails, if you "Request production access" in the dashboard you don't need to do this. Otherwise, verifying the following emails for local testing:
68+
69+
70+
71+
- `[email protected]` (only if you need to do testing with replies)
72+
6573
#### (Suggested) Use ngrok to make your local server available
6674
When SES sends email thru an SNS HTTPS subscription, it is helpful to have a
6775
permanent public domain that proxies your local server. [ngrok](ngrok) is a
@@ -123,7 +131,18 @@ right domain. So, you'll need to set some environment variable values:
123131
* `MOZMAIL_DOMAIN=yourdomain.com`
124132
125133

126-
Note again: These are NOT your ngrok.io domain.
134+
Note again: These are NOT your ngrok.io domain. Any user that wishes to reply will need to have their email verified in the free tier of SES (see the "Verify Emails" section above)
135+
136+
One challenge with making both of these domains the same is that the reply logic assumes there are two different domains. In order to test replies in a local environment, you have two options:
137+
138+
1. Set up an additional domain for the `replies` email address that is configured for SES reply handling (follow same steps as above)
139+
2. Alter the following line in `emails/views.py`:
140+
141+
`domain_numerical = get_domain_numerical(domain)` can be replaced with:
142+
143+
`domain_numerical = get_domain_numerical(domain) if local_address != 'example_mask_address' else 2`.
144+
145+
This will allow replies that are sent to `[email protected]` to be properly forwarded to the user that owns the mask.
127146

128147
### Set up your AWS SES to send emails FROM your app
129148
The last part of Relay is sending emails FROM the Relay app to the real email

0 commit comments

Comments
 (0)