Sending emails from your application - tstorrnetnz/teaching2025 GitHub Wiki
Introduction
You may need to send an email from your application. Actually, your application won't send an email itself, but rather get your email provider to send an email. This needs to be secure - so you are not randomly sending emails from an account without the account holder knowing!
How it works -gmail
This requires a gmail account. I suspect that it must be a private one (not school). The following tutorial shows how How to Send Emails in Python with Gmail SMTP and API.
Use the Send email in Python using Gmail SMTP method - after firat installing the correct libraries.
Do not use the Send email in Python using Gmail API method.