Skip to content

Commit e61ce93

Browse files
Update Gmail mailer configuration (#22291)
This PR updates the `[mailer]` configuration snippet for Gmail: - The `HELO_HOSTNAME` isn't required. - The `USER` must not include the @gmail domain. - `HOST` needs to be supplied, and the SMTP port number needs to be appended to the URL. I also added a note about the requirement to use App passwords instead of your Google account password directly. Co-authored-by: delvh <[email protected]>
1 parent b994b2e commit e61ce93

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Diff for: docs/content/doc/usage/email-setup.en-us.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,15 @@ The following configuration should work with GMail's SMTP server:
7676
```ini
7777
[mailer]
7878
ENABLED = true
79+
HOST = smtp.gmail.com:465 ; Remove this line for Gitea >= 1.18.0
7980
SMTP_ADDR = smtp.gmail.com
8081
SMTP_PORT = 465
81-
82-
USER = example@gmail.com
82+
FROM = example.user@gmail.com
83+
USER = example.user
8384
PASSWD = ***
8485
MAILER_TYPE = smtp
8586
IS_TLS_ENABLED = true
86-
HELO_HOSTNAME = example.com
8787
```
88+
89+
Note that you'll need to create and use an [App password](https://support.google.com/accounts/answer/185833?hl=en) by enabling 2FA on your Google
90+
account. You won't be able to use your Google account password directly.

0 commit comments

Comments
 (0)