Skip to content

Commit

Permalink
api: Emails should always come from the admin address
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Jan 24, 2025
1 parent 84d63dd commit e3af10f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/api/emails/bookstore-suggested/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class extends Email {

getTo = () => process.env.SMTP_USERNAME!;
getToName = () => process.env.SMTP_FRIENDLYNAME!;
getFrom = () => this.data.user?.email || "[email protected]";
getFrom = () => process.env.SMTP_USERNAME!;
getFromName = () => this.data.user?.username || "Anonymous";
getSubject = () => "Bookstore suggestion";
}
2 changes: 1 addition & 1 deletion packages/api/emails/edge-model-ready/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class extends Email {
};
}

getFrom = () => this.data.user.email!;
getFrom = () => process.env.SMTP_USERNAME!;
getFromName = () => this.data.user.username;
getTo = () => process.env.SMTP_USERNAME!;
getToName = () => process.env.SMTP_FRIENDLYNAME!;
Expand Down
2 changes: 1 addition & 1 deletion packages/api/emails/edge-photo-sent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class extends Email {
};
}

getFrom = () => this.data.user.email!;
getFrom = () => process.env.SMTP_USERNAME!;
getFromName = () => this.data.user.username;
getTo = () => process.env.SMTP_USERNAME!;
getToName = () => process.env.SMTP_FRIENDLYNAME!;
Expand Down
2 changes: 1 addition & 1 deletion packages/api/emails/feedback-sent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class extends Email {

getTo = () => process.env.SMTP_USERNAME!;
getToName = () => process.env.SMTP_FRIENDLYNAME!;
getFrom = () => this.data.user?.email || "[email protected]";
getFrom = () => process.env.SMTP_USERNAME!;
getFromName = () => this.data.user?.username || "Anonymous";
getSubject = () =>
i18n.__("User {{username}} sent a feedback", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class extends Email {
this.data = data;
}

getFrom = () => this.data.user.email!;
getFrom = () => process.env.SMTP_USERNAME!;
getFromName = () => this.data.user.username!;
getTo = () => process.env.SMTP_USERNAME!;
getToName = () => process.env.SMTP_FRIENDLYNAME!;
Expand Down

0 comments on commit e3af10f

Please sign in to comment.