From "Automate The Boring Stuff With Python", here, and the matching course on Wireshark.
Going through the course, I saw 'Email' as an option, and was immediately excited to see how we can send automated emails with Python sans using a fancy SaaS with sparkling GUI.
I'm not going to copy the article listed above verbatim, but talk about things that are new to me.
One of the commands is type(), which shows us the kind ('type') of argument.
You can put in three things and it makes a new type object; type(brachius, 53, phelonious)
Since this is port 587, we need TLS (Transport Layer Security, symmetric key!) encryption;
I wonder what the b'2.0.0 means.
Otherwise, the server is ready. In an era where 2-Factor Authentication is all the rage (For good reason), how will logging into an email account via the command line work with that?
I'm getting a 'Bad Credentials' Error message - is it just me?
Maybe, maybe not.
Oh, and we also get an answer to that 2-Factor Authentication Question; We'd have to allow the accounts to allow access from less secure apps (Unless said account is set up with 2FA)...I also got a lot of security alerts from Google. Thanks for the concern, folks! It's me.
After quite a lot of finagling that proved I do not know my passwords as well as I believe I do, I get into an account.
Now; to send myself a message;
It did work, although it was sent to my Spam folder, and I got the formatting wrong. Good thing it's a short message.
& always remember to disconnect from the server. And that's how it's done - with SMTP at least.