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
1
vote
3 answers

flask mail error “SMTPServerDisconnected('please run connect() first')”

I am writing a little web application based on Miguel Grinberg's Flasky. I use the exact same code for user send reset password mail using gmail. The following as my email.py file here i can implement mail sending function def…
ijaz Bacha
  • 49
  • 8
1
vote
2 answers

Flask Mail Bad Header Error Assign Variable

def verification(): global ver_pw list_pw = [] email_list = [] email_list.append(email) print(email_list) for _ in range(0,4): randomly = random.randint(0,1) if randomly == 0: letter =…
Noah Schmidt
  • 26
  • 1
  • 7
1
vote
1 answer

Flask email link prefixed with link

I have a Flask backend. I'm sending a registration link to users. The link that arrives in the email (I'm sending it to my personal hotmail email address) is as…
Ayudh
  • 1,673
  • 1
  • 22
  • 55
1
vote
2 answers

Flask Uploading + Folder Creation + FrontEnd Showing it

My problem is the following: I'm creating and commercial proposal app, it should receive files in the input form, save them inside a folder named as the model.id and show them in the front end, inside the page of the proposal. My…
NGeorg
  • 21
  • 2
1
vote
1 answer

why can't I return to login html page?

@app.route('/forgotpasswd/',methods=['GET', 'POST']) def forgot_passwd(token): form = Newpasswd(request.form) password=form.passwd.data if request.method == "POST" and form.validate(): try: email =…
Apple
  • 141
  • 2
  • 7
1
vote
1 answer

Flask-mail image not showing when sending html template

I'm very new with flask-email and now i try to send the html email which is have the image inside the body of template but when open this html on email the image does not showing up, so how can i fix it. This is my example code. msg =…
Kaow
  • 483
  • 2
  • 9
  • 22
1
vote
1 answer

image embedded in email HTML template - Flask-mail ValueError: too many values to unpack (expected 2)

I tried to send a response email from the HTML template that includes an image on the header. If I send HTML without image attachment there is no error but it is a text email like. I searched and test for a couple of days, no success. Flask-email…
dannisis
  • 423
  • 7
  • 17
1
vote
1 answer

How to suppress flask_mail console output

I'm using flask_mail to connect to send emails through gmail. However, the console is printing out the entire html of the render template and other sends/reply. How do I suppress this? Can't find any documentation in…
Bazzert
  • 77
  • 2
  • 7
1
vote
1 answer

Python3 threading on AWS Lambda

I am using flask, and have a route that sends emails to people. I am using threading to send them faster. When i run it on my local machine it takes about 12 seconds to send 300 emails. But when I run it on lambda thorough API Gateway it times…
bjernie
  • 158
  • 3
  • 13
1
vote
0 answers

How to send an email with attachment using Python Flask /flask_mail

I recently started my adventure with python and only a couple weeks ago I discovered flask. I'm trying to send an email with output.csv file attached using flask. Output.csv has been saved as a result of submitting a html form from my form.html…
Baobab1988
  • 685
  • 13
  • 33
1
vote
0 answers

How can I use flask mail to send message on a particular date?

I was going through the flask mail documentation and had seen many videos of how to use flask mail. A form has 2 fields which will accept date and email address from the user. The owner of the application will send a "Hi" message on that particular…
Avi
  • 53
  • 3
1
vote
1 answer

Is there any way by which I can name the attached pdf file in flask mail?

I am using flask-mail to send a mail that would include a pdf document as an attachment, The problem is when I receive it in my email the document's name turns out to be "noname" (without any extension), Even though this document is downloadable…
Pavan Varyani
  • 1,454
  • 1
  • 8
  • 15
1
vote
1 answer

Requests Get and Flask Mail Python

msg.html = requests.get("http://2teso.com/cachedigital/themail.html") mail.send(msg) I don't want to use something like this: msg.html = """

Hey

""" Which works by the way. I would just like to ref a file. How can I do this? I thought I…
1
vote
1 answer

'Blueprint' object has no attribute 'config'

I am using flask-mail. But when i call the rest api in front end(react.js) of flask mail i am getting this error 'Blueprint' object has no attribute 'config' Here is my code for flask mail from flask import Flask,Blueprint from flask_mail import…
jobaer sourav
  • 87
  • 1
  • 8
1
vote
2 answers

Flask-mail create independent mail instead of email thread

I'm creating an email verification service and using Flask-mail. Whenever a user Signs up, I'm sending a unique validation link to verify the email address. As per my code, the email subject (verify your email address...) remains the same while the…
Adithya Upadhya
  • 2,239
  • 20
  • 28