Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/collections/Emails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ export const Emails: CollectionConfig = {
// Send email blast
if (recipients.length > 0) {
await req.payload.sendEmail({
to: 'events@purduehackers.com',
// Real recipients are bcc'd, so the To is only the copy we keep. It
// has to be an address Email Routing delivers, or that copy goes
// nowhere.
to: 'team@purduehackers.com',
bcc: recipients,
subject,
text,
Expand Down
4 changes: 3 additions & 1 deletion src/collections/Events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ async function sendEventBlast(req: PayloadRequest, doc: Event): Promise<number>
const emailInfo = await getEmailData(doc)
if (recipients.length > 0 && emailInfo) {
await req.payload.sendEmail({
to: 'events@purduehackers.com',
// Real recipients are bcc'd, so the To is only the copy we keep. It has to
// be an address Email Routing delivers, or that copy goes nowhere.
to: 'team@purduehackers.com',
bcc: recipients,
subject: emailInfo.subject,
text: emailInfo.text,
Expand Down