Activate a Python script #690
Closed
ilikemyfto
started this conversation in
Ideas
Replies: 1 comment
-
Thanks but at this time I'm not looking to support other languages. If you're having issues sending emails please open and issue with any logs that can help track down the problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can't seem to get email responses for notifications. I wish it was possible to run a Python Script similar to:-
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email import encoders
email_user = "[email protected]"
email_password = "password"
email_send = "address to send to"
subject = "Test email from pi"
msg = MIMEMultipart()
msg["From"] = email_user
msg["To"] = email_send
msg["Subject"] = subject
body = "Hi there, sending this email from Python!"
msg.attach(MIMEText(body,"plain"))
text = msg.as_string()
server = smtplib.SMTP("smtp.gmail.com",587)
server.starttls()
server.login(email_user,email_password)
server.sendmail(email_user,email_send,text)
server.quit()
Beta Was this translation helpful? Give feedback.
All reactions