forked from Shelf-nu/shelf.nu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow custom FROM value for emails not to be marked as spam for mismatched domain. Signed-off-by: Anatoli Nicolae <[email protected]>
- Loading branch information
1 parent
5454410
commit 65194dd
Showing
4 changed files
with
6 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ SERVER_URL="http://localhost:3000" | |
SMTP_PWD="super-safe-passw0rd" | ||
SMTP_HOST="mail.shelf.nu" | ||
SMTP_USER="[email protected]" | ||
SMTP_FROM="Shelf <[email protected]>" | ||
|
||
MAPTILER_TOKEN="maptiler-token" | ||
MICROSOFT_CLARITY_ID="microsoft-clarity-id" | ||
|
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import nodemailer from "nodemailer"; | ||
import { NODE_ENV, SMTP_HOST, SMTP_PWD, SMTP_USER } from "."; | ||
import { NODE_ENV, SMTP_HOST, SMTP_PWD, SMTP_USER, SMTP_FROM } from "."; | ||
|
||
export const sendEmail = async ({ | ||
to, | ||
|
@@ -40,7 +40,7 @@ export const sendEmail = async ({ | |
|
||
// send mail with defined transport object | ||
await transporter.sendMail({ | ||
from: '"Shelf.nu" <[email protected]>', // sender address | ||
from: SMTP_FROM || '"Shelf.nu" <[email protected]>', // sender address | ||
to, // list of receivers | ||
subject, // Subject line | ||
text, // plain text body | ||
|
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 |
---|---|---|
|
@@ -49,6 +49,7 @@ MAPTILER_TOKEN="someToken" | |
SMTP_HOST="smtp.yourhost.com" | ||
SMTP_USER="[email protected]" | ||
SMTP_PWD="yourSMTPpassword" | ||
SMTP_FROM="Shelf <[email protected]>" | ||
``` | ||
|
||
- This step only applies if you've opted out of having the CLI install dependencies for you: | ||
|