Merge pull request #272 from LeoChen98/feat-add-mail-push

feat: add mail push
This commit is contained in:
usual2970
2024-10-29 08:38:10 +08:00
committed by GitHub
10 changed files with 423 additions and 3 deletions

View File

@@ -23,9 +23,10 @@ export type NotifyChannels = {
telegram?: NotifyChannel;
webhook?: NotifyChannel;
serverchan?: NotifyChannel;
mail?: NotifyChannelMail;
};
export type NotifyChannel = NotifyChannelDingTalk | NotifyChannelLark | NotifyChannelTelegram | NotifyChannelWebhook | NotifyChannelServerChan;
export type NotifyChannel = NotifyChannelDingTalk | NotifyChannelLark | NotifyChannelTelegram | NotifyChannelWebhook | NotifyChannelServerChan | NotifyChannelMail;
export type NotifyChannelDingTalk = {
accessToken: string;
@@ -54,6 +55,16 @@ export type NotifyChannelServerChan = {
enabled: boolean;
};
export type NotifyChannelMail = {
senderAddress: string;
receiverAddresses: string;
smtpHostAddr: string;
smtpHostPort: string;
username:string;
password:string;
enabled: boolean;
};
export const defaultNotifyTemplate: NotifyTemplate = {
title: "您有 {COUNT} 张证书即将过期",
content: "有 {COUNT} 张证书即将过期,域名分别为 {DOMAINS},请保持关注!",