[Mailer] Sender address rejected: not logged in

Hello! First of all a big thanks to the devs…Vikunja is amazing and I have been enjoying it very much!

However, I have been trying to get emails working but have been unsuccessful in doing so. I have finally learned through reading this forum to enable the mail log to see what is going on.
I’ve been using the vikunja testmail function in the docker container for testing and was getting a success message but no email delivered. It wasn’t until I enabled logging that I found that the email isn’t actually sending, instead giving the following output:

...
2025-01-29T01:27:17.284654936Z: DEBUG   ▶ [MAIL] 010 553 5.7.1 <tasks@divnectar.com>: Sender address rejected: not logged in
2025-01-29T01:27:17.284742631Z: DEBUG   ▶ [MAIL] 011 RSET
...

I’ve double checked and even re-generated a new token from protonmail to make sure that the password is correct, and everything is spot on. I’m really lost what to do next or how to diagnose this error any further.

For completeness, I am running vikunja using coolify. Here is the relevant env vars from my docker compose file:

      - VIKUNJA_MAILER_ENABLED=1
      - VIKUNJA_SERVICE_ENABLEEMAILREMINDERS=1
      - VIKUNJA_MAILER_HOST=smtp.protonmail.ch
      - VIKUNJA_MAILER_PORT=587
      - VIKUNJA_LOG_MAIL=1
      - VIKUNJA_MAILER_FORCESSL=1
      - VIKUNJA_MAILER_AUTHTYPE=PLAIN
      - VIKUNJA_LOG_MAILLEVEL=DEBUG
      - VIKUNJA_MAILER_PASSWORD=<password>
      - VIKUNJA_MAILER_USERNAME=<email>
      - VIKUNJA_MAILER_FROMEMAIL=<same-email>

I can also check my sent folder in proton and see that no mail is actually being sent.

I’d really appreciate any help on the topic - thanks in advance! This seems to be a really helpful place from what I’ve reading :slight_smile:

Proton

Free Proton Mail? AFAIK It does not offer SMTP services in free plan meaning you can’t use it to send emails programatically.
I guess paid version for not too much offers SMTP, but it’s worth to double-check.

Gmail

I have not found any other free/privacy-oriented alternative so I’ve sticked with Gmail (not recommended from privacy point of view). At least I expect myself to be precisely targeted with shokingly fitting ads everywhere I go because it trains daily on list of my due tasks.

Just in case you’ll go with Gmail, here are my Vikunja env vars:

      # Email
      VIKUNJA_SERVICE_ENABLEEMAILREMINDERS: 1
      VIKUNJA_DEFAULTSETTINGS_EMAIL_REMINDERS_ENABLED: 1
      VIKUNJA_MAILER_ENABLED: 1
      VIKUNJA_MAILER_HOST: smtp.gmail.com
      VIKUNJA_MAILER_PORT: 465
      VIKUNJA_MAILER_AUTHTYPE: plain
      VIKUNJA_MAILER_USERNAME: googleusername
      VIKUNJA_MAILER_PASSWORD: aaaa bbbb cccc dddd
      VIKUNJA_MAILER_SKIPTLSVERIFY: 0
      VIKUNJA_MAILER_FROMEMAIL: whoknows@example.com
      VIKUNJA_MAILER_QUEUELENGTH: 100
      VIKUNJA_MAILER_QUEUETIMEOUT: 30
      VIKUNJA_MAILER_FORCESSL: 1

I am using proton business with SMTP token generated and a custom domain hooked to it. I was using the same credentials when using WordPress for SMTP mail

maybe something with port. Try reading other mail related topics out here I saw they often get fixed with port change

I’ve tried port 587 (per proton instructions) and followed where a few of these threads were fixed with port 25…but when using another port besides 587 the testmail command just hangs and never completes

also worth noting that I’ve no other mail services running on the server and no firewall at the moment to block port 587

try toggling VIKUNJA_MAILER_SKIPTLSVERIFY and VIKUNJA_MAILER_FORCESSL env vars back and forth in a combination with different ports