[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.
```
[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`
```
FROM = example.user@gmail.com
USER = example.user
PASSWD = `***`
-MAILER_TYPE = smtp
+PROTOCOL = smtp
IS_TLS_ENABLED = true
```
[mailer]
ENABLED = true
FROM = gitea@mydomain.com
-MAILER_TYPE = sendmail
+PROTOCOL = sendmail
SENDMAIL_PATH = /usr/sbin/sendmail
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`
```
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 帐户密码。
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}
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}
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}"""
```
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}"""
```
[mailer]
ENABLED = true
-MAILER_TYPE = dummy
+PROTOCOL = dummy
FROM = mssql-{{TEST_TYPE}}-test@gitea.io
[service]
[mailer]
ENABLED = true
-MAILER_TYPE = dummy
+PROTOCOL = dummy
FROM = mysql-{{TEST_TYPE}}-test@gitea.io
[service]
[mailer]
ENABLED = true
-MAILER_TYPE = dummy
+PROTOCOL = dummy
FROM = pgsql-{{TEST_TYPE}}-test@gitea.io
[service]
[mailer]
ENABLED = true
-MAILER_TYPE = dummy
+PROTOCOL = dummy
FROM = sqlite-{{TEST_TYPE}}-test@gitea.io
[service]