Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending email with SSL/TLS does not work #8

Closed
raouldo opened this issue Jan 22, 2023 · 3 comments
Closed

Sending email with SSL/TLS does not work #8

raouldo opened this issue Jan 22, 2023 · 3 comments

Comments

@raouldo
Copy link

raouldo commented Jan 22, 2023

Hello,

After several attempts, I couldn't configure the emails to receive them correctly with a common SMTP configuration with SSL on.

Steps to reproduce.

  1. pip install cookiecutter
  2. cookiecutter https://github.com/whythawk/full-stack-fastapi-postgresql
  3. Add a SMTP configuration (==> add SMTP_TLS=True in .env by default)
  4. docker-compose up
  5. Try to send a magic link or a reset password email.
    => Nothing happen.

After few research, I find out that the configuration inside backend (utilities) is not correct.
See python-emails documentation here: https://python-emails.readthedocs.io/en/latest/
Must replace tls by ssl inside the file.

Do you see a better idea?

@turukawa
Copy link
Member

@raouldo I'll raise this to a cookiecutter setting and include in the mail utilities. That way you get some flexibility depending on the mail server you're using. My test was fine with them as is, but obviously this isn't ubiquitous.

turukawa added a commit that referenced this issue Jan 27, 2023
@turukawa
Copy link
Member

@raouldo OK, updated. I note that python-emails also supports DKIM signatures. That something I should include, or adding yet another layer of complexity too far?

@turukawa
Copy link
Member

Release 0.7.1 should fix this.

echocraft201315 added a commit to echocraft201315/fastAPI-mongoDB that referenced this issue Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants