From 0533187f28f293adaf34f58d4a285ae2b0b267ad Mon Sep 17 00:00:00 2001 From: Felix Victor Date: Wed, 26 Jul 2023 15:50:15 +0200 Subject: [PATCH] Update email-setup.en-us.md (#26068) The setting `MAILER_TYPE` is deprecated. According to the config cheat sheet, it should be `PROTOCOL`. --------- Co-authored-by: Lunny Xiao --- docs/content/administration/email-setup.en-us.md | 7 +++---- docs/content/administration/email-setup.zh-cn.md | 8 +++----- docs/content/installation/with-docker-rootless.en-us.md | 2 +- docs/content/installation/with-docker-rootless.zh-cn.md | 2 +- docs/content/installation/with-docker.en-us.md | 3 +-- docs/content/installation/with-docker.zh-cn.md | 3 +-- tests/mssql.ini.tmpl | 2 +- tests/mysql.ini.tmpl | 2 +- tests/pgsql.ini.tmpl | 2 +- tests/sqlite.ini.tmpl | 2 +- 10 files changed, 14 insertions(+), 19 deletions(-) diff --git a/docs/content/administration/email-setup.en-us.md b/docs/content/administration/email-setup.en-us.md index 2f92e20410..10058d8284 100644 --- a/docs/content/administration/email-setup.en-us.md +++ b/docs/content/administration/email-setup.en-us.md @@ -31,7 +31,7 @@ Note: For Internet-facing sites consult documentation of your MTA for instructio [mailer] ENABLED = true FROM = gitea@mydomain.com -MAILER_TYPE = sendmail +PROTOCOL = sendmail SENDMAIL_PATH = /usr/sbin/sendmail SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent an email address being interpreted as an option. ``` @@ -44,10 +44,9 @@ Directly use SMTP server as relay. This option is useful if you don't want to se [mailer] ENABLED = true FROM = gitea@mydomain.com -MAILER_TYPE = smtp +PROTOCOL = smtps SMTP_ADDR = mail.mydomain.com SMTP_PORT = 587 -IS_TLS_ENABLED = true USER = gitea@mydomain.com PASSWD = `password` ``` @@ -80,7 +79,7 @@ SMTP_PORT = 465 FROM = example.user@gmail.com USER = example.user PASSWD = `***` -MAILER_TYPE = smtp +PROTOCOL = smtp IS_TLS_ENABLED = true ``` diff --git a/docs/content/administration/email-setup.zh-cn.md b/docs/content/administration/email-setup.zh-cn.md index e526a9d433..0a7ac3378f 100644 --- a/docs/content/administration/email-setup.zh-cn.md +++ b/docs/content/administration/email-setup.zh-cn.md @@ -31,7 +31,7 @@ Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮 [mailer] ENABLED = true FROM = gitea@mydomain.com -MAILER_TYPE = sendmail +PROTOCOL = sendmail SENDMAIL_PATH = /usr/sbin/sendmail SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 将防止电子邮件地址被解释为选项。 ``` @@ -44,10 +44,9 @@ SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" [mailer] ENABLED = true FROM = gitea@mydomain.com -MAILER_TYPE = smtp +PROTOCOL = smtps SMTP_ADDR = mail.mydomain.com SMTP_PORT = 587 -IS_TLS_ENABLED = true USER = gitea@mydomain.com PASSWD = `password` ``` @@ -80,8 +79,7 @@ SMTP_PORT = 465 FROM = example.user@gmail.com USER = example.user PASSWD = `***` -MAILER_TYPE = smtp -IS_TLS_ENABLED = true +PROTOCOL = smtps ``` 请注意,您需要创建并使用一个 [应用密码](https://support.google.com/accounts/answer/185833?hl=en) 并在您的 Google 帐户上启用 2FA。您将无法直接使用您的 Google 帐户密码。 diff --git a/docs/content/installation/with-docker-rootless.en-us.md b/docs/content/installation/with-docker-rootless.en-us.md index 3c81c8633c..fc99819d7f 100644 --- a/docs/content/installation/with-docker-rootless.en-us.md +++ b/docs/content/installation/with-docker-rootless.en-us.md @@ -306,7 +306,7 @@ services: environment: - GITEA__mailer__ENABLED=true - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - - GITEA__mailer__MAILER_TYPE=smtp + - GITEA__mailer__PROTOCOL=smtp - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - GITEA__mailer__IS_TLS_ENABLED=true - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} diff --git a/docs/content/installation/with-docker-rootless.zh-cn.md b/docs/content/installation/with-docker-rootless.zh-cn.md index 1910e0a884..9d5013eaa0 100644 --- a/docs/content/installation/with-docker-rootless.zh-cn.md +++ b/docs/content/installation/with-docker-rootless.zh-cn.md @@ -274,7 +274,7 @@ services: environment: - GITEA__mailer__ENABLED=true - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - - GITEA__mailer__MAILER_TYPE=smtp + - GITEA__mailer__PROTOCOL=smtp - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - GITEA__mailer__IS_TLS_ENABLED=true - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} diff --git a/docs/content/installation/with-docker.en-us.md b/docs/content/installation/with-docker.en-us.md index 7b47046031..f5a09e9fc5 100644 --- a/docs/content/installation/with-docker.en-us.md +++ b/docs/content/installation/with-docker.en-us.md @@ -303,9 +303,8 @@ services: environment: - GITEA__mailer__ENABLED=true - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - - GITEA__mailer__MAILER_TYPE=smtp + - GITEA__mailer__PROTOCOL=smtps - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - - GITEA__mailer__IS_TLS_ENABLED=true - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" ``` diff --git a/docs/content/installation/with-docker.zh-cn.md b/docs/content/installation/with-docker.zh-cn.md index e04d3158a1..d8cbc2f950 100644 --- a/docs/content/installation/with-docker.zh-cn.md +++ b/docs/content/installation/with-docker.zh-cn.md @@ -287,9 +287,8 @@ services: environment: - GITEA__mailer__ENABLED=true - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} - - GITEA__mailer__MAILER_TYPE=smtp + - GITEA__mailer__PROTOCOL=smtps - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} - - GITEA__mailer__IS_TLS_ENABLED=true - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" ``` diff --git a/tests/mssql.ini.tmpl b/tests/mssql.ini.tmpl index 10e70d35fc..93ade74805 100644 --- a/tests/mssql.ini.tmpl +++ b/tests/mssql.ini.tmpl @@ -58,7 +58,7 @@ PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/data/attachments [mailer] ENABLED = true -MAILER_TYPE = dummy +PROTOCOL = dummy FROM = mssql-{{TEST_TYPE}}-test@gitea.io [service] diff --git a/tests/mysql.ini.tmpl b/tests/mysql.ini.tmpl index 9d6bbd65e6..10aa3cabbe 100644 --- a/tests/mysql.ini.tmpl +++ b/tests/mysql.ini.tmpl @@ -58,7 +58,7 @@ SSH_TRUSTED_USER_CA_KEYS = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCb4DC1dMFnJ6pXW [mailer] ENABLED = true -MAILER_TYPE = dummy +PROTOCOL = dummy FROM = mysql-{{TEST_TYPE}}-test@gitea.io [service] diff --git a/tests/pgsql.ini.tmpl b/tests/pgsql.ini.tmpl index dd45ab717a..2b54843c30 100644 --- a/tests/pgsql.ini.tmpl +++ b/tests/pgsql.ini.tmpl @@ -59,7 +59,7 @@ PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/data/attachments [mailer] ENABLED = true -MAILER_TYPE = dummy +PROTOCOL = dummy FROM = pgsql-{{TEST_TYPE}}-test@gitea.io [service] diff --git a/tests/sqlite.ini.tmpl b/tests/sqlite.ini.tmpl index 969c15698d..546b27c5f6 100644 --- a/tests/sqlite.ini.tmpl +++ b/tests/sqlite.ini.tmpl @@ -55,7 +55,7 @@ PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/attachments [mailer] ENABLED = true -MAILER_TYPE = dummy +PROTOCOL = dummy FROM = sqlite-{{TEST_TYPE}}-test@gitea.io [service]