Skip to content

Instantly share code, notes, and snippets.

@ulrischa
Created Sep 5, 2020
Embed
What would you like to do?
#!/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