Questions tagged [flask-mail]

The Flask-Mail extension provides a simple interface to set up SMTP with your Flask application and to send messages from your views and scripts.

The Flask-Mail extension provides a simple interface to set up SMTP with your Flask application and to send messages from your views and scripts.

249 questions
5
votes
4 answers

OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

I'm experimenting with the use of Huey as a cross platform task queue . I've found https://github.com/pjcunningham/flask-huey-example , which I've cloned and set up a virtualenv for using conda (I'm working on windows). I've followed the updated…
user1592380
  • 34,265
  • 92
  • 284
  • 515
4
votes
4 answers

Google disabled access to less secure apps

With google having disabled the access to enable access to less secure apps can anyone suggest ways in which I can send mails using flask-mail? It has to be disabled in the mail account I'm using to send mails using flask-mail.
alex
  • 41
  • 3
4
votes
1 answer

Send bulk emails in background task with Flask

I'm using Flask Mail to send emails from my Flask App. No problem using it from the main thread. However I have a route that can send a quite large amount of emails (enough I think to exceed the HTTP Timeout) and I'd like to quickly return a…
Misfits09
  • 176
  • 1
  • 9
4
votes
1 answer

SSL error trying send an email with Flask-mail

I have been trying to send an email using Flask-mail but I always got about SSL.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076) // Werkzeug Debugger also I using Mailtrap as dummy email server to test my app. I have been…
user3693057
4
votes
1 answer

How to adapt flask-mail to support two SMTP accounts

I am using flask-mail to send from one account and it works fine. The unique information about multiple smtp accounts that I found in Google is this old comment. What I have: MAIL_USERNAME = config.get('mail_service', 'USER') MAIL_PASSWORD =…
anvd
  • 3,997
  • 19
  • 65
  • 126
4
votes
2 answers

flask mail error: headers = [self.sender, self.reply_to] + self.recipients

I'm supposed to explain why my question is not a duplicate of: TypeError: can only concatenate list (not “str”) to list ...so it's not a duplicate because that post deals with the concatenation operator, +, appearing in the code; whereas my issue…
okcapp
  • 405
  • 1
  • 4
  • 15
4
votes
1 answer

Why text attachment sent using Flask Mail is empty?

I am attempting to send an email with Flask-Mail with a .txt file attachment. Thus far either I get an error or the email sends but the .txt. file is blank I've tried it two ways: One way following the documentation: with…
mikey8989
  • 484
  • 5
  • 14
4
votes
1 answer

Flask-Mail failing

when i run the following i would expect to send an email from my gmail account to my gmail account. Instead i get a timeout error. I have tried tried all possible combinations i could think of including those here import os from flask import…
Drew Verlee
  • 1,880
  • 5
  • 21
  • 30
3
votes
1 answer

smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted)

I'm writing a site on Flask and I came across the problem that when sending emails to email users there is such an error. smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 …
Dimaapp
  • 123
  • 1
  • 1
  • 7
3
votes
1 answer

Internal Server Error: when trying to use flask-mail

I am trying to send mail to the user through flask-mail. This code shown below works fine on the localhost. But when I deployed my flask app to AWS Elastic Beanstalk and use the send_reset_email function, it throws me Internal Server Error. Where…
Heisenberg
  • 31
  • 5
3
votes
1 answer

smtplib.SMTPSenderRefused: (530, b'5.7.0 Authentication Required.) in flask

I see many solutions but still, I have a problem for send mail and I also set email and password to ~/.bash_profile so please help me. Here my connfig.py file code import os class Config: SECRET_KEY=os.environ.get('SECRET_KEY') …
Malav Mevada
  • 178
  • 11
3
votes
2 answers

Flask Mail doesn't work when deployed on Ubuntu

I'm sending password reset email with Flask-Mail. When I tried it on development server everything works fine. When deployed on Ubuntu (using NGINX, Gunicorn) sending the email leads after a long loading time to Error 502 so I don't think there's…
Thomas
  • 31
  • 3
3
votes
1 answer

RuntimeError: Working outside of application context. in my flask app

I'm trying to schedule sending email from my flask application with this function : from apscheduler.scheduler import Scheduler scheduler = Scheduler() scheduler.start() def email_job_scheduling(): to="abdellah.ala@gmail.com" …
3
votes
2 answers

Prevent end of email from being collapsed

I'm using Flask-Mail to send email notifications for events and currently I'm encountering a problem where if two emails of the same subject end with the same thing (which is a rather niche circumstance, but definitely necessary to consider…
hyper-neutrino
  • 5,272
  • 2
  • 29
  • 50
3
votes
1 answer

Why is Flask-Mail actually sending messages during testing

I have the following test in my app: @pytest.mark.usefixtures('database') def test_reset_email(client): assert current_app.config['TESTING'] with mail.record_messages() as outbox: response = client.post('/reset',…
Chuck
  • 4,662
  • 2
  • 33
  • 55
1
2
3
16 17