Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manager shutdown reporting #265

Open
dgasmith opened this issue May 22, 2019 · 0 comments
Open

Manager shutdown reporting #265

dgasmith opened this issue May 22, 2019 · 0 comments
Labels
Enhancement Project enhancement discussion

Comments

@dgasmith
Copy link
Contributor

dgasmith commented May 22, 2019

Is your feature request related to a problem? Please describe.
It would be good if a manager could (optionally) send out an email upon shutdown and possibly upon a few other actions. This turns out to be straightforward to do in Python:

import smtplib, ssl

port = 465  # For SSL
smtp_server = "smtp.gmail.com"
sender_email = "my@gmail.com"  # Enter your address
receiver_email = "your@gmail.com"  # Enter receiver address
password = input("Type your password and press enter: ")
message = """\
Subject: Hi there

This message is sent from Python."""

context = ssl.create_default_context()
with smtplib.SMTP_SSL(smtp_server, port, context=context) as server:
    server.login(sender_email, password)
    server.sendmail(sender_email, receiver_email, message)

We would likely recommend building a dummy account to do this, but fits in well to our current structure and can be called during the shutdown procedure.

@dgasmith dgasmith added the Enhancement Project enhancement discussion label May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Project enhancement discussion
Projects
None yet
Development

No branches or pull requests

1 participant