mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 22:03:08 +02:00
refactor
This commit is contained in:
parent
9ea7d75aa4
commit
cfa38e875c
1 changed files with 77 additions and 78 deletions
|
@ -21,8 +21,8 @@ export async function sendEmail(to: string, subject: string, html: string, text:
|
||||||
proxy: config.proxySmtp,
|
proxy: config.proxySmtp,
|
||||||
auth: enableAuth ? {
|
auth: enableAuth ? {
|
||||||
user: meta.smtpUser,
|
user: meta.smtpUser,
|
||||||
pass: meta.smtpPass
|
pass: meta.smtpPass,
|
||||||
} : undefined
|
} : undefined,
|
||||||
} as any);
|
} as any);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -33,7 +33,7 @@ export async function sendEmail(to: string, subject: string, html: string, text:
|
||||||
subject: subject,
|
subject: subject,
|
||||||
text: text,
|
text: text,
|
||||||
html: `<!doctype html>
|
html: `<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>${ subject }</title>
|
<title>${ subject }</title>
|
||||||
|
@ -111,8 +111,7 @@ export async function sendEmail(to: string, subject: string, html: string, text:
|
||||||
<a href="${ config.url }">${ config.host }</a>
|
<a href="${ config.url }">${ config.host }</a>
|
||||||
</nav>
|
</nav>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>`,
|
||||||
`
|
|
||||||
});
|
});
|
||||||
|
|
||||||
logger.info('Message sent: %s', info.messageId);
|
logger.info('Message sent: %s', info.messageId);
|
||||||
|
|
Loading…
Reference in a new issue