diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-11-11 05:12:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 16:12:23 -0500 |
commit | fb704f6c7248a13b29300e161bd28c52115aeb22 (patch) | |
tree | 4e0e025a8e3e01bc9e7a29d67bc4b011afe404dc /cmd | |
parent | 92525ddffd8256a2cd9d10c55eca753073ffce8e (diff) | |
download | gitea-fb704f6c7248a13b29300e161bd28c52115aeb22.tar.gz gitea-fb704f6c7248a13b29300e161bd28c52115aeb22.zip |
Revert unrelated changes for SMTP auth (#21767)
The purpose of #18982 is to improve the SMTP mailer, but there were some
unrelated changes made to the SMTP auth in
https://github.com/go-gitea/gitea/pull/18982/commits/d60c43869420f5fc43ad19b454c9ae50dad65964
This PR reverts these unrelated changes, fix #21744
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/admin.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/admin.go b/cmd/admin.go index 525bc2cfcd..d33d17a53d 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -413,9 +413,9 @@ var ( Usage: "SMTP Authentication Type (PLAIN/LOGIN/CRAM-MD5) default PLAIN", }, cli.StringFlag{ - Name: "addr", + Name: "host", Value: "", - Usage: "SMTP Addr", + Usage: "SMTP Host", }, cli.IntFlag{ Name: "port", @@ -955,8 +955,8 @@ func parseSMTPConfig(c *cli.Context, conf *smtp.Source) error { } conf.Auth = c.String("auth-type") } - if c.IsSet("addr") { - conf.Addr = c.String("addr") + if c.IsSet("host") { + conf.Host = c.String("host") } if c.IsSet("port") { conf.Port = c.Int("port") |