diff --git a/assets/mi-white.png b/assets/mi-white.png new file mode 100644 index 000000000..b075c2633 --- /dev/null +++ b/assets/mi-white.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ecc0040d97e5eb7469a5a371738918673004c07950b46bf9234815364ee0ba2 +size 18767 diff --git a/src/services/send-email.ts b/src/services/send-email.ts index 5a8f92be5..e713ea78d 100644 --- a/src/services/send-email.ts +++ b/src/services/send-email.ts @@ -8,6 +8,9 @@ export const logger = new Logger('email'); export async function sendEmail(to: string, subject: string, text: string) { const meta = await fetchMeta(true); + const iconUrl = `${config.url}/assets/mi-white.png`; + const emailSettingUrl = `${config.url}/settings/email`; + const enableAuth = meta.smtpUser != null && meta.smtpUser !== ''; const transporter = nodemailer.createTransport({ @@ -26,8 +29,85 @@ export async function sendEmail(to: string, subject: string, text: string) { const info = await transporter.sendMail({ from: meta.email!, to: to, - subject: subject || 'Misskey', - text: text + subject: subject, + text: text, + html: ` + + + + ${ subject } + + + +
+
+ +
+
+

${ subject }

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