Skip to content

Commit

Permalink
Merge pull request #20 from dabigjoe6/from-name
Browse files Browse the repository at this point in the history
Add from name in Sendgrid payload
  • Loading branch information
dabigjoe6 authored Aug 13, 2023
2 parents a617575 + f1c5327 commit f262dee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/send-feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ class SendFeed {
Sendgrid.setApiKey(process.env.SENDGRID_API_KEY || "");
await Sendgrid.send({
to: this.user.email,
from: (process.env.FROM || ""),
from: {
email: (process.env.FROM || ""),
name: process.env.FROM_NAME || 'Synthesis',
},
subject: "Your personalized source for informative and inspiring content",
text: "Your daily dose of knowledge, tailored for you: Stay informed effortlessly with your personal digest.",
html: message,
Expand Down
5 changes: 4 additions & 1 deletion src/send-welcome-email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ const sendWelcomeEmail = async (message: Array<string>) => {
Sendgrid.setApiKey(process.env.SENDGRID_API_KEY || "");
await Sendgrid.send({
to: email,
from: (process.env.FROM || ""),
from: {
email: (process.env.FROM || ""),
name: process.env.FROM_NAME || 'Synthesis',
},
subject: "Welcome to Synthesis",
text: "Your daily dose of knowledge, tailored for you: Stay informed effortlessly with your personal digest.",
html: message
Expand Down

0 comments on commit f262dee

Please sign in to comment.