This may well be a duplicate ... but I have looked through the similar questions quite carefully. This is the kind of thing, but it's in C#. Or this, using Windows PowerShell. Or this for PHP.
I have just discovered how to send automated emails from a Python script and I intend to use these for various purposes, including when various sys admin tasks need to issue an alert.
I don't want such scripts to prompt the user for the password to the email account, but obviously I don't want to write the password out in the .py file either.
What's the right way to go about this? Is there a specific python solution to this?