summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorClar Fon <15850505+clarfonthey@users.noreply.github.com>2022-08-02 01:24:18 -0400
committerGitHub <noreply@github.com>2022-08-02 13:24:18 +0800
commit036dd8a788468e7730b29982747cc3cf8829ce86 (patch)
tree27d7bdd0a616a6f67a4e2140136cfb9c9b80296d /cmd
parentae3b88bef36179fb43ddcf2a14b46ca0969d8aad (diff)
downloadgitea-036dd8a788468e7730b29982747cc3cf8829ce86.tar.gz
gitea-036dd8a788468e7730b29982747cc3cf8829ce86.zip
Rework mailer settings (#18982)
* `PROTOCOL`: can be smtp, smtps, smtp+startls, smtp+unix, sendmail, dummy * `SMTP_ADDR`: domain for SMTP, or path to unix socket * `SMTP_PORT`: port for SMTP; defaults to 25 for `smtp`, 465 for `smtps`, and 587 for `smtp+startls` * `ENABLE_HELO`, `HELO_HOSTNAME`: reverse `DISABLE_HELO` to `ENABLE_HELO`; default to false + system hostname * `FORCE_TRUST_SERVER_CERT`: replace the unclear `SKIP_VERIFY` * `CLIENT_CERT_FILE`, `CLIENT_KEY_FILE`, `USE_CLIENT_CERT`: clarify client certificates here Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/admin.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/admin.go b/cmd/admin.go
index 3375435749..6c2a8626c4 100644
--- a/cmd/admin.go
+++ b/cmd/admin.go
@@ -414,9 +414,9 @@ var (
Usage: "SMTP Authentication Type (PLAIN/LOGIN/CRAM-MD5) default PLAIN",
},
cli.StringFlag{
- Name: "host",
+ Name: "addr",
Value: "",
- Usage: "SMTP Host",
+ Usage: "SMTP Addr",
},
cli.IntFlag{
Name: "port",
@@ -956,8 +956,8 @@ func parseSMTPConfig(c *cli.Context, conf *smtp.Source) error {
}
conf.Auth = c.String("auth-type")
}
- if c.IsSet("host") {
- conf.Host = c.String("host")
+ if c.IsSet("addr") {
+ conf.Addr = c.String("addr")
}
if c.IsSet("port") {
conf.Port = c.Int("port")