Join my free course on the basics of Flask-SQLAlchemy: prettyprinted.com/flasksql
@tusharniras7 жыл бұрын
Thanks Anthony, your videos (all) are very helpful...
@prettyprinted7 жыл бұрын
You're welcome! And thanks for joining my stream today.
@choryyours7 жыл бұрын
hi I've been following you for a while now and your videos are very helpful! I have a question though. Let's say I want to build an app that let users to type in their emails and password and send an email using that account entered. is it possible to instantiate the config during runtime? or like while the app is running?
@simplepycodes5 жыл бұрын
awesome tutorial. my question is that when you develop Flask web app, is it a must to use flask mail for Mailing functions? why not just use, lets say smtplib? Thanks a lot.
@prettyprinted5 жыл бұрын
You can use the library itself, but Flask-Mail just fits the Flask pattern a little better.
@simplepycodes5 жыл бұрын
@@prettyprinted Thank you
@antheashybi10796 жыл бұрын
Thank you for this video sir.. Can you please tell me..how to send bulk mail in this!
@prettyprinted6 жыл бұрын
Here's how to send bulk emails: pythonhosted.org/Flask-Mail/#bulk-emails
@rajagopalxyz7 жыл бұрын
First of all, Thanks a lot for wonderful tutorials. :) I have two questions on emails. a) Can I have multiple email backend settings ? As far as I saw only one email setting could be configured. b) Is there any way to dynamically change or choose email setting during runtime ?
@prettyprinted7 жыл бұрын
You could, but it's hard to explain. I'll make a video on this eventually.
@fouad095 жыл бұрын
Hi, Greate tutorial btw. I am using flask-mail and the following config : app.config['MAIL_SERVER']='smtp.office365.com' app.config['MAIL_PORT'] = 587 app.config['MAIL_USE_TLS'] = True app.config['MAIL_USE_SSL'] = False when I run my app locally I am able to receive the message but when I use Heroku I receive a winmail.dat file do you have any idea how to fix this issue? thanks
@piyalisen29935 жыл бұрын
I am using university proxy, what additional code needs to be written, for it to work
@ishanichakravorty92755 жыл бұрын
hey! thank you so much for making this video! i just wanted to ask what does if __name__ == 'main: app.run(debug=True) do?thanks!
@prettyprinted5 жыл бұрын
It starts the server if you execute the file from the command line. If you include the file within any module, the server won't start.
@ishanichakravorty92755 жыл бұрын
Pretty Printed thank you
@TheNetoCampos8 жыл бұрын
Hi Anthony! How are you doing? Look, I've followed this lesson and successfully managed to send a email via Flask-Mail. The problem is that when the email arrives in my inbox, it comes from the email that I provided via config (along with the password), and not from the sender email (provided when creating the message). Do you know how to send from sender? Thanks!
@prettyprinted8 жыл бұрын
I'm doing well, thanks, Try the MAIL_DEFAULT_SENDER config value. Just beware that if the email account domain and sender domain are different, you'll likely trigger anti-spam functionality in the receiver's email inbox. Thanks for watching!
@TheNetoCampos8 жыл бұрын
I'll try that. Thanks for the answer and keep the good work.
@Glauberz17 жыл бұрын
hello,whats written in the config.cfg file?could you post here because i am having trouble trying send email,i tried in a lot of ways but not worked.
@prettyprinted7 жыл бұрын
My configuration file has my email information in it, so I don't want to show it. You'll have to play around with the port settings and SSL/TLS settings until you find the right combination.
@chrisc.41448 жыл бұрын
This was great. Thank you !
@prettyprinted8 жыл бұрын
Thanks for watching! (I'm just now seeing your comment).
@llamasarus16 жыл бұрын
Does Flask-mail only work for sending messaging messages? I want to receive messages. This only works if I put my email address as the sender but I want to be the recipient and I other people to send a messages to me through a contact form. How do I do that instead? I tried switching my email address as the recipient but I got an error....
@prettyprinted6 жыл бұрын
You can only send emails. For receiving emails, you just use your regular email client.
@djuka81214 жыл бұрын
Why do you need a sender if you defined it with app.config.from_pyfile('config.cfg') and inside that file is 'EMAIL_USERNAME' = 'email' and 'EMAIL_PASSWORD' = 'pass' #note that email and pass are examples
@shubhamchaudhary59166 жыл бұрын
error 11003 .... socket.gaierror ... how to solve plz reply
@prettyprinted6 жыл бұрын
It probably means the host you provided for your email is incorrect.
@wimrotor8 жыл бұрын
Always hitting this error when trying to use the Flask-Mail module: > (venv) pi@raspberrypi:/var/www/flaskapp $ python manage.py shell > ImportError: No module named flask.ext.mail Yet in my main.py: > from flask_mail import Mail, Message Yet in pip install FLask-Mail : > (venv) pi@raspberrypi:/var/www/flaskapp $ sudo pip install Flask-Mail > Requirement already satisfied (use --upgrade to upgrade): Flask-Mail in /usr/local/lib/python2.7/dist-packages Try to look on internet, but is rather not clear to me what is going wrong. If you could assist? Many thanks in advance?
@wimrotor8 жыл бұрын
Just found out that I need to run everything with "root" permissions: > sudo pip install Flask-Mail==0.9.1 > Successfully installed Flask-Mail > (venv) pi@raspberrypi:/var/www/flaskapp $ sudo pip freeze | grep "ail" > Flask-Mail==0.9.1 > (venv) pi@raspberrypi:/var/www/flaskapp $ python manage.py shell > File "/var/www/flaskapp/main.py", line 5, in > from flask_mail import Mail, Message >ImportError: No module named flask_mail BUT: (venv) pi@raspberrypi:/var/www/flaskapp $ sudo python manage.py shell >>> Is working ... ! :)
@prettyprinted8 жыл бұрын
I'm glad you figured it out. Thanks for watching!
@marcelgiglio7 жыл бұрын
but there is no diferentiation between body and subject? this recipients, its cc or cco?
@prettyprinted7 жыл бұрын
Here you can see all the parameters available: pythonhosted.org/Flask-Mail/
@arjunaefenusdesilalahi34504 жыл бұрын
how to give html template on email
6 жыл бұрын
Vale, muito. bom! thanks.
@prettyprinted6 жыл бұрын
You're welcome. Thanks for watching!
@oohachallagolla93614 жыл бұрын
showing [Errno 101] Network is unreachable :(
@hemantgautam14 жыл бұрын
How can we send attachment in the email?
@yolomein4155 жыл бұрын
how come you dont need a password, is it possible that i send from someone else's email!?
@prettyprinted5 жыл бұрын
I do use a password. You just don't see it in the video. It's in the config.cfg file.
@yolomein4155 жыл бұрын
Pretty Printed so in the config file, do you just have a plaintext password or is it like password=“the_password”?
@prettyprinted5 жыл бұрын
@@yolomein415 You can use quotes in the config file. So just password='the_password'
@yolomein4155 жыл бұрын
Pretty Printed thanks 🙏 i get it now!!!
@alejandrombc8 жыл бұрын
Good bro!, can you please talk a little bit louder the next time?. Thanks!
@prettyprinted8 жыл бұрын
+Alejandro Barone Sorry, I was using a crappy mic at the time. I just bought a new one, so hopefully sound won't be a problem. Thanks for watching!