-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: hide other recipients #911
Conversation
0bafa5e
to
3d0b26b
Compare
Looking for thoughts on the decision between bcc and looping through emails described in the description above 🧼 |
@ColinBuyck is this still on Hold? |
982861f
to
bad853b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧶
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! super minor nit comment but giving approval!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hefty to test 😰 looks great!
75f20e2
to
d6a304e
Compare
This PR addresses #873
Description
This PR sends emails via 'bcc' rather than the 'to' field in order to hide the other recipients of the email. My research showed that the options are simple: use the bcc field to send in bulk or loop through each email and send individually. I've included some resources below mentioning the use of the bcc field. Both implementations are straightforward but I worried that sending emails individually could lead to serious performance issues. I also heard mentions of this approach requiring queuing systems which seemed out of scope. The risk of the bcc approach is that the empty "to" field is more likely to be flagged as suspicious so a dummy email like "[email protected]" could be used to help address that concern... though seemingly not entirely.
Nodemailer discussion: nodemailer/nodemailer#385
SES advocating for the altenative of sending individually: https://aws.amazon.com/blogs/messaging-and-targeting/how-to-send-messages-to-multiple-recipients-with-amazon-simple-email-service-ses/
Stackoverflow supporting bcc: https://stackoverflow.com/questions/66627529/send-email-to-undisclosed-recipients-nodemailer
Mentions of potential flagging with empty "to" field: https://security.stackexchange.com/questions/177713/how-did-i-get-this-email-without-a-to-field
https://stackoverflow.com/a/27855503
UPDATE: After discussing with product and Morgan, we're going to utilize bcc to send the bulk emails but use the jurisdiction's from address to avoid the spam flagging issue mentioned above.
UPDATE PART 2: The public side will have to be tested with totally separate emails not just modified with a plus symbol since two bcc emails to the same inbox will only show as one email.
How Can This Be Tested/Reviewed?
This can be tested most easily with the lottery flow. Create an admin and partner user connected to your email. Find a listing with lottery enabled and fill out two applications with two separate accounts on the public side. Then, go through the lottery flow with the two partners portal users and notice that emails sent to admins don't show [email protected] in the recipient list. Then, publish the results to the public and you're two applicant emails should send separately and not have visibility to one another in the email information.
Author Checklist:
yarn generate:client
and/or created a migration when requiredReview Process: