fief-dev / fief

Users and authentication management SaaS
https://www.fief.dev
Other
486 stars 42 forks source link

custom email (SMTP) not working #271

Closed JustinGuese closed 9 months ago

JustinGuese commented 9 months ago

Describe the bug

SMTP custom emails don't work, at least not for ZOHO emails

To Reproduce

Steps to reproduce the behavior:

  1. Set email provider to custom
EMAIL_PROVIDER=SMTP
EMAIL_PROVIDER_PARAMS={"host": "smtppro.zoho.eu", "username": "xxxx", "password": "ZohoAppPassword", "port": 465, "ssl" : "True"}
  1. Wait ~1 Minute
  2. Timeout shows in logs

Expected behavior

Email is sent

Configuration

Additional context

I bet you are not setting a secure connection and just use the default python smtp? This does not work anymore with current email providers (since ~2000)

JustinGuese commented 9 months ago

When I am using the same combinations in python with smtplib (the secure connection mode), it works. When using the default smtplib it does not work since that was switched off by most email providers a long time ago

JustinGuese commented 9 months ago

yes that was indeed the problem, created a PR

frankie567 commented 9 months ago

Our implementation of SMTP supports TLS, which is most likely over port 587 on your provider.

Actually, we already gave a specific solution for Zoho: https://github.com/orgs/fief-dev/discussions/234#discussioncomment-6374491