Description
Description
I am running Gitea as a docker container.
In the past I have been able to use a SMTP server with authentication successfully.
I have recently had to change SMTP providers and now am getting this error message when I am testing email:
Failed to send a testing email to "<redacted>": gomail: could not send email 1: failed to authenticate SMTP: 535 5.7.8 Error: authentication failed: authentication failure
I have looked into the debugs, but there are not many around the email process.
I have also tried another go based CLI mail program (github.com/kiwimic/mailCLI) to see if the SMTP service is working with the same SMTP credentials as I have configured for Gitea.
That CLI worked.
I also tested with the swaks
CLI tool with the same SMTP credentials, and it worked too.
So, I am wondering why Gitea isn't working. Is there a way to get more debugging information out of Gitea? I have set the log level to DEBUG, but it isn't including things like what attributes it is passing to the SMTP service or anything like that.
I am wondering if it is a string encoding issue or something that is causing the SMTP server to say authentication failure
.
Any assistance would be fantastic - I'm happy to diagnose further, I am not as familiar with go
as with other languages.
Gitea Version
1.20.0+dev-888-g64e0672e3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
This is the only console log about the test email:
gitea | 2023/05/24 15:41:13 ...eb/routing/logger.go:102:func1() [I] router: completed POST /admin/config/test_mail for []:0, 303 See Other in 2924.0ms @ admin/config.go:31(admin.SendTestMail)
Git Version
git version 2.40.1
Operating System
Docker container
How are you running Gitea?
Within a Docker container using the gitea/gitea:nightly
release.
I used nightly
to see if the isn't had been resolved in the latest version.
docker-compose.yml
contains:
...
- GITEA__mailer__PROTOCOL=smtp+starttls
- GITEA__mailer__SMTP_PORT=587
- GITEA__mailer__IS_TLS_ENABLED=true
# shouldn't need this but giving it a try
- GITEA__mailer__FORCE_TRUST_SERVER_CERT=false
- GITEA__mailer__FROM=<redacted>
- GITEA__mailer__USER=<redacted>
- 'GITEA__mailer__SUBJECT_PREFIX=GITEA: '
- GITEA__mailer__PASSWD=`<redacted>`
...
Database
MySQL