 Right, so hey guys and we'll come back to another Python tutorial I figured out I might as well do a Python tutorial since I know it's been a really really really long time since we've done one So in this tutorial, I'm gonna make it really short And I'm gonna show you how to basically send an email using Python So without further ado, let's begin first of all, I'll start by creating a new Python file My computer's froze there for a second. Okay, text file Call this file anything, but don't call it email. You can call it email one or whatever because if you call it email It's gonna produce errors Just so you know I'm gonna call it email one for now, and then I'm gonna edit it in idle So first of all what you want to do is we're gonna be using SMTP Lib, which is a library that allows us to send emails and pythons. So import SMTP Lib Well, if you haven't got it installed already, I recommend you do. The way you would do that is by opening CMD and then typing in pip install SMTP Lib Well, mine shows up as an error because obviously mine's already installed But by default, I think it should be installed in your computers. If it wasn't then just follow the steps I just did before using pip. So once you've done the import what you want to do is initialize a few variables So we're gonna need the sender's email address. So sender Email equals I'm gonna be using one of my older accounts. So tonofo at gmail.com This is where you're gonna type in the email that you're gonna be logged into Which you're gonna send the using which you're gonna send the other email then we need the receiver's email I'm just gonna do REC for receiver email And that's gonna be my Column email where I'm gonna be receiving the email so Just type that in as well Then you're also going to need the password for your email So that you're able to log in. I'm just gonna put that as an input string Please enter your password Okay, then we also need the message which is going to be sent over the email. So for this, I'm just gonna say, hey This was Using python Okay, so now that we've initialized everything we want to go ahead and start a server. The way we're gonna do this is To start a connection to gmail. We need to initialize a new variable called server And then we need to assign that to sm tplib dot sm tp And then in here is going to be the server address which we're going to be connecting to which is going to be sm tp lib sm tp dot gmail.com And then the port which we're going to be using is going to be 587 I think After that what you want to do is um start the connection. But how you're going to do that is type in server dot start tls And then after that you want to um Log in into the server so server dot login The Sender email which is your email obviously, so you're going to use your email and the password to log in Once we're done with that we can just say print login success Okay, and then after that what you want to do is finally send the email so server dot send mail Um, there's three arguments needed here. So the sender email which is your email The receiver's email which is the person receiving the email And the message which we have saved into the variable message Okay, once all this is done, we'll just print email has been sent to Receiver email And now we're going to try and run this hopefully it's going to work without any errors Okay, so please enter your password. I'm going to enter my password Obviously, it's going to be blurred out because I don't want you guys sneaking around my email box And we have an error. So it says the server is not defined It's probably a spelling mistake that I've done in the Yeah, there we go. I missed out an R here. So if we put an R in here And now we rerun the program I'll type in my password Login success and as you see right here, it says email has been sent to Johan Godino at gmail.com, right? Now I'm going to go into chrome and just cross check that I've received the email. I'll go to my gmail quickly And as you guys can see right here, it says Hey, this was sent using python form 12 novel at gmail.com obviously So yeah, that was it for today's tutorial guys. Hope I was able to help you If you guys want any further python tutorials, please make sure to drop them in the comments And I'll see you in the next one. Also, don't forget to subscribe. Peace out