-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from ITPNYU/feature/change_reply_to
Set reply email address
- Loading branch information
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 = () => { | ||
|
@@ -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) { | ||
|
@@ -38,6 +40,7 @@ export const sendHTMLEmail = ( | |
const htmlBody = htmlTemplate.evaluate().getContent(); | ||
const options = { | ||
htmlBody, | ||
replyTo: '[email protected]', | ||
}; | ||
GmailApp.sendEmail(targetEmail, subj, body, options); | ||
}; |