Sending SMTP Email
-
Is there a straight forward micro python script or lib for sending email on Gpy, or Wipy, or Lopy?
We currently use the following code with Python 3 smtplib on RaspberryPi;
server = smtplib.SMTP('mailserver',port,'',5) print ('Connected to the smtp server, trying to log on...') server.ehlo(host) print ('Sent ehlo') server.login(smtp_user, smtp_password) print ('Logged onto smtp server, trying to send email...') server.sendmail(fromaddr, recipients, message) server.close() -
@guyc usually, one would rather do it from a server, and trigger that from the device using a webservice or the network-specific equivalent (you won’t be doing SMTP over LoRaWAN...).
But if you absolutely want to do it (I would recommend doing so only if you have WiFi avalaible), what issue are you having with smtplib? Are you getting an error? If so, which?
-
We have a number of modules (Gpy, Wipy, and Lopy) all of which we are using WiFi. We need to send an email on an event (GPIO going hi or lo as an example). For Micro Python we cannot find any smtp libraries. We see a dummy smtplib but we cannot find any functional smtplib for Micro Python that can run on Gpy, Wipy, or Lopy.
Are there any such libraries like Python 3 version of smtplib to send email via WiFi for Micro Python?
-
I have email send method implemented in my MycroPython port as a part of the curl module.
I think it could be easily ported to Pycom's MicroPython (curl_mail.c, modcurl.c)... -
This post is deleted! -
This post is deleted!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login