It can be useful for notifying the end of a simulation
Source: https://realpython.com/python-send-email/
-
Create google account and turn Allow less secure apps to ON. Do not use your own account
-
Example of script that uses the account to send e-mails. No need to install libraries.
import smtplib, ssl
port = 465
e_mail = 'notify.abcpy@gmail.com'
password = 'XXX' # TODO
receiver = 'XXX@XXX' # TODO
message = 'Test'
context = ssl.create_default_context()
with smtplib.SMTP_SSL('smtp.gmail.com', port, context=context) as server:
server.login(e_mail, password)
server.sendmail(e_mail, receiver, message)For an alternative, probably better, solution, check this youtube video https://www.youtube.com/watch?v=Y9l2-1YTdlI