feat: support custom SMTP port setting (#45)

* feat: support custom SMTP port setting

* fix: send SMTPPort value to frontend

---------

Co-authored-by: JustSong <quanpengsong@gmail.com>
This commit is contained in:
snowmeow
2023-02-05 14:46:45 +08:00
committed by GitHub
co-authored by JustSong
parent ba25a15bca
commit 6b15b2080e
4 changed files with 21 additions and 1 deletions
+4
View File
@@ -36,6 +36,7 @@ func InitOptionMap() {
common.OptionMap["MessageRenderEnabled"] = strconv.FormatBool(common.MessageRenderEnabled)
common.OptionMap["SMTPServer"] = ""
common.OptionMap["SMTPAccount"] = ""
common.OptionMap["SMTPPort"] = strconv.Itoa(common.SMTPPort)
common.OptionMap["SMTPToken"] = ""
common.OptionMap["Notice"] = ""
common.OptionMap["About"] = ""
@@ -114,6 +115,9 @@ func updateOptionMap(key string, value string) {
switch key {
case "SMTPServer":
common.SMTPServer = value
case "SMTPPort":
intValue, _ := strconv.Atoi(value)
common.SMTPPort = intValue
case "SMTPAccount":
common.SMTPAccount = value
case "SMTPToken":