From 461e23be2f57094c47b8ff937ce53c05eec501e4 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Fri, 9 Feb 2024 19:39:12 +0800 Subject: [PATCH] refactor: beautify SMTP email style --- .../model/notification/provider/smtp.ts | 37 +++++++++++++++++- website/static/img/logo@128.png | Bin 3579 -> 3377 bytes 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/server/model/notification/provider/smtp.ts b/src/server/model/notification/provider/smtp.ts index 18ffa5f..293ec8d 100644 --- a/src/server/model/notification/provider/smtp.ts +++ b/src/server/model/notification/provider/smtp.ts @@ -45,7 +45,42 @@ export const smtp: NotificationProvider = { cc: payload.cc, bcc: payload.bcc, subject: subject, - html: bodyTextContent, + html: generateSMTPHTML(bodyTextContent), }); }, }; + +function generateSMTPHTML(message: string) { + return ` + + + + + Tianji + + + +
+
+ +
+
+ ${message} +
+
+
+ Sent with ❤ by Tianji. +
+
+ Github +
+
+
+ + + `; +} diff --git a/website/static/img/logo@128.png b/website/static/img/logo@128.png index ca0b4a73402c9191d97398d6770386291e8de329..5b494cefe4ae9a21f72ee3b3546f20fae3ce6c46 100644 GIT binary patch delta 3324 zcmVcb9@NF)-8L?V$$Boc{4;#c7gejWBi`lm?$6X|n@+@VNc9e*;3NFb#jiByVou2Llu zv&gOtIXY)ykxk4PhHa%c(;1|4&2vsV5g!x>a6~{125^8l z`2&ejs1TR?*QrEeXJVQDjW!OLdlztkc!?qon7aW)HLu=6%m#ez%zgLIjfey0>;Z1V z!xnT8>48!QR7uQo>=<#i_-4vszvo}hFc@T?PLFOcadmiC!EOXO;#2$?+T)kzI|%5J z^f#(bIDc-4QRwKGZi-rP30WaN6<1jDWQb=zphUYd``$yP^2i~LXtrIUUiQo&6-}1x zbAvt=z%19yFkeF;BR{f~`z8Dvfi3S+)$;-~Fban7ide$ll5)(;5J)k5ma>+Cu32IR zudm4vRuPnU;kf=u!0UGCznXAFtjmf zSG<5-@db8s_g%^6X=VX~blc~F6J6t}qa2x%+tnb>R323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