commentoplusplus
commentoplusplus copied to clipboard
unable to send mails using STARTTLS
Currently, it is impossible to send mails using STARTTLS, I get the following error in the logs:
2022/10/21 11:40:20 [ERROR] smtp_email_notification.go:48 smtpEmailNotification(): cannot send email notification email: 530 Must issue a STARTTLS command first.
The fix is relatively straightforward, in smtp_send.go
the following line needs to be added when using STARTTLS:
server.Encryption = mail.EncryptionSTARTTLS
I will try to make a pull request to add the fix.
I have a similar problem (Docker). With the original Commento there is no problem with the same configuration. I use Zoho mail. My configuration:
COMMENTO_SMTP_HOST=smtp.zoho.eu
COMMENTO_SMTP_PORT=587
COMMENTO_SMTP_USERNAME=[myzohousername]
COMMENTO_SMTP_PASSWORD=[REDACTED]
[email protected]
The error, when i try to reset password, is:
2022/10/25 13:24:55 [ERROR] smtp_reset_hex.go:19 smtpResetHex(): cannot send reset email: 530 Must issue a STARTTLS command first.
Have just merged this fix! @tealaforgia please try the latest docker image, with USE_STARTTLS=true
Thanks, now the bug seems to be fixed.Email are sended correctly with my configuration.
@tealaforgia Sorry to bother you but how did you get it working with Zoho? I have used the exact same configuration as yours (but with .com) but I'm getting:
[ERROR] smtp_reset_hex.go:19 smtpResetHex(): cannot send reset email: 553 Relaying disallowed as @
This is my config:
COMMENTO_SMTP_HOST=smtp.zoho.com
COMMENTO_SMTP_PORT=587
[email protected]
COMMENTO_SMTP_PASSWORD=mypassword
[email protected]
I also have "[email protected]
" configured in Zoho as alias. Note that I'm using the latest release not the latest commit, but at least I should get the STARTTLS error first, no? I've also tried the same FROM address as the login name. I have two factor auth enabled but created an app password - the same config works with Vaultwarden so no idea what the problem is. Maybe I overlooked something? 🤔
Ok I had to use the latest commit then everything worked plus the above issue was fixed. Of course USE_STARTTLS
must be true
.
SMTP only worked for me after adding this variable:
USE_STARTTLS = true