From c28a5afb6c853e91fa5e90d2c33e7bc4fd9b8af8 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Wed, 29 Dec 2021 11:20:31 +0800 Subject: [PATCH] update --- READEME.md | 48 ++++++++++++++++++++++++------------------------ main.go | 3 +++ 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/READEME.md b/READEME.md index 29275d3..8082a96 100644 --- a/READEME.md +++ b/READEME.md @@ -4,39 +4,39 @@ ```json { - "From":"", - "TO": [""], - "Title": "台新人壽通知", + "From":"sender email", + "TO": ["array of receiver emails"], + "Title": "email subject", "Body": { "App": { - "Name":"", - "Link":"", - "Logo":"", - "Copyright":"", - "TroubleText":"", - "Theme": "", - "TitleColor": "", - "FooterColor": "" + "Name":"site name (optional)", + "Link":"site link (optional)", + "Logo":"site logo (precedence over site name) (optional)", + "Copyright":"site copyright string (default to site name) (optional)", + "TroubleText":"help string for button link (optional)", + "Theme": "email back groud color (default #F2F4F6) (optional)", + "TitleColor": "email site name color (default #2F3133) (optional)", + "FooterColor": "email copyright color (default #AEAEAE) (optional)" }, - "Intros": [""], - "Content": "", - "Outros": [""], + "Intros": ["begining lines (optional)"], + "Content": "markdown content (optional)", + "Outros": ["closing lines (optional)"], "Actions": [ { - "Instructions": "", - "InviteCode": "", + "Instructions": "text before action (optional)", + "InviteCode": "invitation code, only one of `Button`/`InviteCode` should exist (optional)", "Button": { - "Text": "", - "Link": "", - "Color": "", - "TextColor": "" + "Text": "Button Text, only one of `Button`/`InviteCode` should exist (optional)", + "Link": "Button link url (optional)", + "Color": "Button color (default #3869D4) (optional)", + "TextColor": "Button text (default #ffffff) (optional)" } } ], - "Greeting": "", - "Receiver": "", - "Signature": "", - "Sender": "" + "Greeting": "Greeting text (optional)", + "Receiver": "Receiver name, ignored if Greeting is empty (optional)", + "Signature": "Signature text (default `Best Regards`) (optional)", + "Sender": "Sender text (default to site name) (optional)" } } ``` diff --git a/main.go b/main.go index ad37d67..39f8035 100644 --- a/main.go +++ b/main.go @@ -74,6 +74,9 @@ func main() { Copyright: fmt.Sprintf("Copyright © %v %s. All rights reserved.", time.Now().Year(), fName), TroubleText: fTroubleText, + Theme: "#F2F4F6", + TitleColor: "#2F3133", + FooterColor: "#AEAEAE", }) email.SetDailer(gomail.NewDialer(fHost, fPort, fUsr, fPwd))