-
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: switch bulk emails to individual email sends #1013
base: main
Are you sure you want to change the base?
Conversation
49021f3
to
6a6e0c8
Compare
153f547
to
55841ce
Compare
@ludtkemorgan Can you provide some further instructions on how to properly test the bulk email to 50 plus people? Did you do it manually? Could we expand our seeding to include a 'high-user' option like Emily did with yarn setup:large? |
@ColinBuyck Good question! However, it is fairly easy to add a bunch of applications in the seeding data
And then in any of the listings change the applications to |
55841ce
to
cb78468
Compare
api/src/services/email.service.ts
Outdated
} | ||
|
||
public async sendMfaCode(user: User, singleUseCode: string) { | ||
const jurisdiction = await this.getJurisdiction(user.jurisdictions); | ||
void (await this.loadTranslations(jurisdiction, user.language)); | ||
|
||
await this.sendSES({ | ||
await this.sendSingleSES({ |
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.
question: Why do some calls not use the useCase
field but not others?
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.
This was a mistake, I meant to go back to add useCase to all emails. That has been done!
console.log(e); | ||
console.error('Failed to send email'); | ||
this.logger.log(e); | ||
this.logger.error(`Failed to send ${useCase} email to ${mailOptions.to}`); |
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.
nitpick: useCase is an optional field that isn't always supplied, message can be less helpful if it is null
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.
Usecase is now a required field!
cb78468
to
72f5cf6
Compare
This PR addresses #986 #983 #985 #1008
Description
The current setup for emails with multiple recipients has the following problems:
This change resolves the above issues by doing the following:
to
rather thanbcc
Along with the above the following bugs/issues were addressed:
exygy.com
url instead of the correct ones for the notificationsUrl and helpCenterUrlHow Can This Be Tested/Reviewed?
Since this change touches how all emails are sent in Doorway we will need to test all of the different emails sent out
Here is documentation for the the list of emails https://docs.google.com/document/d/1bPl-SVapMcktRt06u-vaT1Lial4OR-gpe__vU0Dgt4c/edit?tab=t.0
To test the site email is also sent during the three lottery emails you will need to add a value to the api's .env file. After adding this you should receive an email for lotteryReleased, lotteryPublishedAdmin, and lotteryPublishedApplicant email sends
Sample:
[email protected]
For the bulk emails some additional testing should be done.
Scenarios:
An easy way test many email send you could add this code to the seed-staging.ts file before line 349 (change the email to your email)
Then change the applications list to that bulkApplications list for any of the listings
Then you should be able to do the whole lottery release flow to receive 50+ application emails
Author Checklist:
yarn generate:client
and/or created a migration when requiredReview Process: