Skip to content

Commit

Permalink
feat: set the "from" address name when sending emails.
Browse files Browse the repository at this point in the history
  • Loading branch information
zicklag committed Jan 9, 2025
1 parent b872435 commit 1617f2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SMTP_PASS="dummy"
SMTP_URL="smtp://dummy:dummy@localhost:2525/?pool=true"

# SMTP for Weird & Rauthy
SMTP_FROM="[email protected]"
SMTP_FROM='Weird One <[email protected]>'

DISCORD_CLIENT_ID=
DISCORD_TOKEN=
Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:
SMTP_DANGER_INSECURE_PORT: 25
SMTP_USERNAME: dummy
SMTP_PASSWORD: dummy
SMTP_FROM: [email protected]
SMTP_FROM: Weird One <[email protected]>
SMTP_DANGER_INSECURE: true
EMAIL_SUB_PREFIX: Weird.One
LOG_LEVEL_ACCESS: Verbose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { Actions } from './$types';
import { marked } from 'marked';
import { emailer } from '$lib/email';
import { listRauthyUsers } from '$lib/rauthy/server';
import { env } from '$env/dynamic/private';

export const load: ServerLoad = async ({}) => {};

Expand Down Expand Up @@ -37,6 +38,7 @@ export const actions = {
for (const recipient of recipients) {
await emailer.sendMail({
to: recipient,
from: env.SMTP_FROM,
subject,
text: bodyMarkdown,
html: bodyHtml
Expand Down

0 comments on commit 1617f2b

Please sign in to comment.