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
fastapi_mail.errors.ConnectionErrors on gmail smtp #113
Comments
Ok I'm pretty sure it's because the api in local host is not secure enough for Google (no https). Is there a way to run the app with uvicorn with a https flag or something? For a second I thought adding
|
i do not think thats problem, we do not have problem send mails when run locally with http, but one our developer has same problem on her network, when she try mobile net then it works, so look like you have some firewall block on router or something, maybe it helps |
It's fixed now but maybe you can explain why because I'm not sure and just continued working on something else: the problem was the value I had for MAIL_USERNAME. Turns out it started working when I set MAIL_USERNAME to be the sender email, which wasn't obvious because the email was already set in MAIL_FROM. So basically it works when MAIL_USERNAME = MAIL_FROM = my_email@gmail.com |
we have same value for about MAIL_FROM i think it do not need to be same, but you need "access" to that mail from smtp acc, |
Hi there! |
I think we are all good with finding and resolving the issue, I will kindly close the issue if you face another issue feel free to open it. And thanks @filipagh for your help also. |
I am getting the following error when trying the first basic example here:
fastapi_mail.errors.ConnectionErrors: Exception raised (535, '5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials l33-20020a0568302b2100b005cdad9100desm5879477otv.40 - gsmtp'), check your credentials or email service configuration
I tried with personal mail/pwd for testing and didn't work. Then I tried with validated mail/pwd currently being used in production on another (flask) app and it didn't work.
The text was updated successfully, but these errors were encountered: