Skip to content

Commit

Permalink
Merge pull request #168 from ITPNYU/feature/change_reply_to
Browse files Browse the repository at this point in the history
Set reply email address
  • Loading branch information
rlho authored Apr 11, 2024
2 parents 60f9696 + d0f33e8 commit 15e7590
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions media_commons_booking_app/src/server/emails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ export const sendTextEmail = (
body: string
) => {
const subj = `${status}: Media Commons request for \"${eventTitle}\"`;
GmailApp.sendEmail(targetEmail, subj, body);
const options = {
replyTo: '[email protected]',
};
GmailApp.sendEmail(targetEmail, subj, body, options);
};

const getEmailBranchTag = () => {
Expand All @@ -29,7 +32,6 @@ export const sendHTMLEmail = (
eventTitle: string,
body
) => {
console.log('contents', contents);
const subj = `${getEmailBranchTag()}${status}: Media Commons request for \"${eventTitle}\"`;
const htmlTemplate = HtmlService.createTemplateFromFile(templateName);
for (const key in contents) {
Expand All @@ -38,6 +40,7 @@ export const sendHTMLEmail = (
const htmlBody = htmlTemplate.evaluate().getContent();
const options = {
htmlBody,
replyTo: '[email protected]',
};
GmailApp.sendEmail(targetEmail, subj, body, options);
};

0 comments on commit 15e7590

Please sign in to comment.