fix: unable to send email for py backend (#16888)

### Summary

As title

Can send email now
<img width="2313" height="1941" alt="image"
src="https://github.com/user-attachments/assets/c129b3c7-7e40-4bdd-8430-f3b402b9cab1"
/>
<img width="1256" height="2760" alt="f6ba88c56fe3945a6d28564fc4d4c54f"
src="https://github.com/user-attachments/assets/ae2dbe0c-e2d4-494f-8b86-03e959ef4808"
/>
This commit is contained in:
Haruko386
2026-07-14 14:59:06 +08:00
committed by GitHub
parent 9289a183a2
commit 7a20920b12
2 changed files with 13 additions and 5 deletions

View File

@@ -162,7 +162,8 @@ async def send_email_html(to_email: str, subject: str, template_key: str, **cont
smtp = aiosmtplib.SMTP(
hostname=settings.MAIL_SERVER,
port=settings.MAIL_PORT,
use_tls=True,
use_tls=settings.MAIL_USE_SSL,
start_tls=settings.MAIL_USE_TLS,
timeout=10,
)