Skip to content

Commit

Permalink
Revert "Allow FROM customization"
Browse files Browse the repository at this point in the history
This reverts commit 65194dd.
  • Loading branch information
anatolinicolae committed Jan 9, 2024
1 parent 43a0a4f commit e1d7ae7
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ 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"
Expand Down
2 changes: 0 additions & 2 deletions app/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ declare global {
SMTP_PWD: string;
SMTP_HOST: string;
SMTP_USER: string;
SMTP_FROM: string;
MAINTENANCE_MODE: string;
GEOCODE_API_KEY: string;
}
Expand Down Expand Up @@ -81,7 +80,6 @@ export const STRIPE_SECRET_KEY = getEnv("STRIPE_SECRET_KEY", {
export const SMTP_PWD = getEnv("SMTP_PWD");
export const SMTP_HOST = getEnv("SMTP_HOST");
export const SMTP_USER = getEnv("SMTP_USER");
export const SMTP_FROM = getEnv("SMTP_FROM");

/**
* Shared envs
Expand Down
4 changes: 2 additions & 2 deletions app/utils/mail.server.ts
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, SMTP_FROM } from ".";
import { NODE_ENV, SMTP_HOST, SMTP_PWD, SMTP_USER } from ".";

export const sendEmail = async ({
to,
Expand Down Expand Up @@ -40,7 +40,7 @@ export const sendEmail = async ({

// send mail with defined transport object
await transporter.sendMail({
from: SMTP_FROM || '"Shelf.nu" <[email protected]>', // sender address
from: '"Shelf.nu" <[email protected]>', // sender address
to, // list of receivers
subject, // Subject line
text, // plain text body
Expand Down
1 change: 0 additions & 1 deletion docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ 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:
Expand Down

0 comments on commit e1d7ae7

Please sign in to comment.