I was playing with the app/site Pushover https://pushover.net/ which is pretty cool. It allowes you to receive notifications on your pc, smartphone and/or tablet.
Was thinking... would be cool to be able to use this when some event happens on the WiPy. (for example: some senson triggers a pin which triggers the Wipy to send an email (or rest call over HTTPS) to the Pushover API.
But here I am stuck. I tried the example from this page: https://www.kickstarter.com/projects/wi ... escription)
when I do this:
Code: Select all
import smtplib
sender = 'my_email_address'
receivers = ['your_email_address']
message = """From: me <my_email_address>
To: You <your_email_address>
Subject: Trouble at mill.
One on't cross beams gone owt askew on treddle.
"""
server = smtplib.SMTP('smtp.gmail.com:587')
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: no such attribute
I only found a dummy library here: https://github.com/micropython/micropython-lib
I understand it is basically an empty file called smtplib.py which I saved to '/flash/lib/smtplib.py'
Pretty sure I am doing something very wrong here, but what?