djangosmtpweblate

SMTPAuthenticationError in Weblate (which uses Django)


I checked quite a few stackoverflow questions about this and none doesn't seem to be the exact case as me and didn't really work for me so posting this question. So I'm trying to setup weblate using docker which wants me to set weblate email host user, password etc. to send mails to users when using the site, my current docker-compose.override.yml looks like this:

version: '3'
services:
  weblate:
    ports:
      - 1111:8080
    environment:
      WEBLATE_EMAIL_HOST: smtp.mymailserver.com
      WEBLATE_EMAIL_PORT: 465
      WEBLATE_EMAIL_HOST_USER: translate@domain.com
      WEBLATE_EMAIL_HOST_PASSWORD: password
      WEBLATE_SERVER_EMAIL: translate@domain.com
      WEBLATE_DEFAULT_FROM_EMAIL: translate@domain.com
      WEBLATE_SITE_DOMAIN: translate.mydomain.com
      WEBLATE_ADMIN_PASSWORD: mypass
      WEBLATE_ADMIN_EMAIL: myemail@domain.com

I checked this with gmail app in mobile with the same outgoing server configuration and it worked perfectly fine there (I was able to send mails from it) but whenever I try it with weblate, I'm seeing this error:

SMTPAuthenticationError: (535, b'Authentication credentials invalid')

This is the whole error I get in the logs enter image description here


Solution

  • You don't have SSL enabled, that might be reason for server rejecting the crendentials. Try enabling WEBLATE_EMAIL_USE_SSL.

    PS: In the upcoming release, this will be turned on automatically for port 465, see https://github.com/WeblateOrg/weblate/commit/efacbf5d7e36c7207e985744639564e7edfc2fbb