Sending an Email in Python via Gmail

Published: 27 November 2017
on channel: LucidProgramming
104,108
1.5k

In this video, we'll be writing a Python script that will allow you to automatically send an email via Gmail.

For this, you should have a Gmail account and Python installed on your machine. You will also need to install the `smtplib` package:
https://docs.python.org/2/library/smt...

In order for this script to work, you must also enable "less secure apps" to access your Gmail account. As a warning, this is not ideal, and Google does indeed warn against enabling this feature. Be forewarned!
https://myaccount.google.com/lesssecu...

The Python scripts provided in this tutorial can be, as always, found on my Github, here:
https://github.com/vprusso/youtube_tu...

Note: If you have verified that the code is identical to the code on my Github, you may want to verify that you don't have any firewall settings preventing you from running as some viewers have mentioned this in the comments section.

Do you like the development environment I'm using in this video? It's a customized version of vim that's enhanced for Python development. If you want to see how I set up my vim, I have a series on this here:
http://bit.ly/lp_vim

If you've found this video helpful and want to stay up-to-date with the latest videos posted on this channel, please subscribe:
http://bit.ly/lp_subscribe


Watch video Sending an Email in Python via Gmail online without registration, duration hours minute second in high quality. This video was added by user LucidProgramming 27 November 2017, don't forget to share it with your friends and acquaintances, it has been viewed on our site 104,108 once and liked it 1.5 thousand people.