Created
September 5, 2020 22:22
-
-
Save ulrischa/3f00d209761b755d1c01df7a546efdd2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import yagmail | |
import sys | |
#initializing the server connection | |
yag = yagmail.SMTP(user='sender@sender', password='xxx') | |
#sending the email | |
yag.send(to='to@to', subject='Motion detected', contents=['Motion', sys.argv[1]]) | |
print("Email sent successfully") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment