11/7/2023 0 Comments Raspberry pi usb camera viewer# Sending emails in combination # with Motion surveillance software # (c) Dr. Having this script available, we can do the following configuration: quit () # Output # print "Message length is " + repr ( len ( msg )) print text sendmail ( fromaddr, toaddrs, text ) smtp. login ( 'username', 'password' ) text = msg. attach ( MIMEText ( body, 'plain' )) # Connecting to SMTP server and # sending the email # smtp = smtplib. Hilpisch # The Python Quants GmbH # import smtplib from datetime import datetime from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText fromaddr = toaddrs = # can be list of strings subject = 'Security Alert.' # Email object # msg = MIMEMultipart () msg = fromaddr msg = toaddrs msg = subject # Email body # body = 'A motion has been detected.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |