From cfa38e875c452dcba4ab07e469b9b1ddeaafc7d4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 12 Nov 2021 21:11:21 +0900 Subject: [PATCH] refactor --- packages/backend/src/services/send-email.ts | 155 ++++++++++---------- 1 file changed, 77 insertions(+), 78 deletions(-) diff --git a/packages/backend/src/services/send-email.ts b/packages/backend/src/services/send-email.ts index d24168ec46..f5f36148f6 100644 --- a/packages/backend/src/services/send-email.ts +++ b/packages/backend/src/services/send-email.ts @@ -21,8 +21,8 @@ export async function sendEmail(to: string, subject: string, html: string, text: proxy: config.proxySmtp, auth: enableAuth ? { user: meta.smtpUser, - pass: meta.smtpPass - } : undefined + pass: meta.smtpPass, + } : undefined, } as any); try { @@ -33,86 +33,85 @@ export async function sendEmail(to: string, subject: string, html: string, text: subject: subject, text: text, html: ` - - - - ${ subject } - - - -
-
- -
-
-

${ subject }

-
${ html }
-
- -
- - - - ` + nav { + box-sizing: border-box; + max-width: 500px; + margin: 16px auto 0 auto; + padding: 0 32px; + } + nav > a { + color: #888; + } + + + +
+
+ +
+
+

${ subject }

+
${ html }
+
+ +
+ + +`, }); logger.info('Message sent: %s', info.messageId);