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
0
votes
1 answer

flask_mail, mails are stuck on thread and never sent

I'm using flask + socketio with ssl, and I'm trying to send mail, but for some reason, sending mail is not working. Here is my configuration: app.config['MAIL_SERVER']='smtp.gmail.com' app.config['MAIL_PORT'] = 465 app.config['MAIL_USERNAME'] =…
Mr Bonjour
  • 3,330
  • 2
  • 23
  • 46
0
votes
0 answers

Overwriting variables in system libraries (smtplib.py)

So I'm using Flask for a website and I'm using the extension Flask Mail to send emails for me. Unfortunately, my email server doesn't support CRAM_MD5 (for a valid reason) so when smtplib.py (Python system library file) reaches the line that…
chelseanderby
  • 39
  • 1
  • 6
0
votes
1 answer

flask mail, connection closed when sending bulk email

I have a web application based on flask together with flask-mail (https://pythonhosted.org/flask-mail/) to send emails. I am running a cronjob every 5min which checks for updates in the database and if it finds updates it sends a bunch of emails to…
carl
  • 4,216
  • 9
  • 55
  • 103
0
votes
1 answer

Flask-Mail: empty messages

currently i'm trying to create contact page using flask, flask-mail and flask-WTF. Message is being sent, but i only get "From: None None Random string". Could You tell me, what i'm doing wrong? server.py: from flask import Flask, render_template,…
Wewow
  • 57
  • 1
  • 1
  • 6
0
votes
1 answer

collecting emails on stack for collective send with flask

I have a little flask app which allows users to send emails to each other. Right now I send these emails directly, but since this takes usually a second or two I would like to avoid letting the user wait and instead I would like to put the email in…
carl
  • 4,216
  • 9
  • 55
  • 103
0
votes
1 answer

Sorry, unexpected error: 'module' object has no attribute 'SMTP_SSL'

This is my code for my main.py file which is designed to be a simple contact form built in flask. from flask import Flask, render_template, request from flask_mail import Mail, Message from forms import ContactForm app =…
Jimmy
  • 12,087
  • 28
  • 102
  • 192
0
votes
1 answer

Socket.error: [Errno 111] Connection refused when submitting an email using flask-mail

from flask_mail import Mail, Message app = Flask(__name__) mail = Mail(app) app.config.update( #EMAIL SETTINGS MAIL_SERVER='smtp.gmail.com', MAIL_PORT=465, MAIL_USE_SSL=True, MAIL_USERNAME = '@gmail.com', …
BigBoy1337
  • 4,735
  • 16
  • 70
  • 138
0
votes
0 answers

Flask-mail Improving performance

I am having troubles optimizing my python email sender function that uses flask-mail. from flask_mail import Message, Mail def send_email_msg(): with mail.connect() as emailConn: with app.app_context(): for msg in…
Mufiz
  • 9
  • 3
0
votes
1 answer

How to configure Flask Mail properly

I am trying to follow this tutorial. When I try to submit the contact form, which should trigger the email, I get an internal server error. The error log says: RuntimeError: The curent application was not configured with Flask-Mail The…
ExperimentsWithCode
  • 1,174
  • 4
  • 14
  • 30
0
votes
1 answer

Flask mail or Marrow mailer

I am working on a flask project. Large part of the project has already been implemented by some previous developers. Going through the code I saw previous developers have implemented Marrow Mailer . So I am just curious what is the reason for…
Waseem
  • 1,392
  • 5
  • 21
  • 30
0
votes
0 answers

Submitting file on Heroku / Flask Production causing Error, works locally

I have a web form that allows people to upload their resume and enter their email, which once submitted, emails the info to me (resume as an email attachment). It works locally but causes as error in production - just says "internal server error".…
Suraj Kapoor
  • 1,615
  • 4
  • 22
  • 34
0
votes
1 answer

Monkey patching Flask-mail's send function

I am wondering if this is even the best approach, but the Flask-Mail extension accepts some SMTP server configs, and calls the send function of the Mail class anytime an email is to be sent. I am using an SMTP provider, and have written my own send…
Sam Hammamy
  • 10,819
  • 10
  • 56
  • 94
-1
votes
0 answers

Sending Mail with flask_mail on Pythonanywhere

I have been trying to make my Flask app send emails with my Gmail account. I have tried the following configurations in my .env…
Max de Boer
  • 262
  • 3
  • 10
-1
votes
1 answer

Sending Confirmation Emails with Flask, RQ (Working outside of application context.)

I am trying to send confirmation emails when a new user registers. When I send a confirmation email, everything works fine, however, when I try to run that task in the background I get the following error: File…
Marti F.R
  • 1
  • 1
-1
votes
1 answer

Not able to import mail in python/flask (ImportError)

I'm trying for days to get an email sending part configured in my Flask app. However I'm stuck in the first (import) part already. Here's a simplified representation of my project: └── my-project │ ├── __init__.py ├── app.py │ …
1 2 3
16
17