Can a P1 send email?
TheGrue
Posts: 114
in Propeller 1
Is it possible for a P1 to send emails via a cellular network without having to go through another MCU like a Raspberry Pi? and what kind of hardware would it take? Has anyone ever successfully done it or are there some examples of sending email from a P1?
Comments
"send email" is a very vaguely defined task. The basic email protocol just involves sending some text back and forth on a TCP socket, but actually getting an email to show up in someone's actual inbox is significantly more involved and basically dark magic due to anti-spam measures. You basically need to relay through an account on an actual mail server (like you do when you send mail on a PC, as it were). Not sure if they require encrypted connections nowadays...
Understood. Maybe I should have described it as a SMTP message like you can set up an "App Password" on GMail for things like refrigerators, CCTV systems etc. I know how to set up GMail SMTP services for devices and have for many CCTV DVR systems. What I do not know is how to get my P1 alarm boards to connect to and send an email without using a Raspberry Pi which keeps dying in the heat. I keep replacing them but in the peak of summer, I replace one or more of them. I have a cellular router that the Pi connects to and the P1 connects to the Pi. But I am wondering if I can eliminate the middle man (Raspberry Pi) and connect the P1 directly to create and send the SMTP messages.
The easiest way is to use an ESP8266 WiFi adapter that allows to setup TCP and UDP connections with simple AT commands via serial port.
The most complicated way is to setup everything so the delivery server accepts the email, and AFAIK, GMail complicates things even more with encrypted connections, app passwords and don't know what... but if you already know how to setup that it should just be a matter of adapting the code (beware that AFAIK ESP* boards don't encrypt the connections, at least with the default firmware).
Alternatively there are sites like Temboo designed to allow "internet of things" devices to use a wide variety of services.
What about text to email?
I equip my tablet HMI's with a data-only SIM, something like $15/5 years.
Craig
What about a WizNet W5500 adapter? Would that work? I need a Cat 5e connection to my Cellular Router.
Text would be even better!
Never used, AFAIK, it uses an SPI connection so it requires a dedicated library of functions.
I think there are examples somewhere in the forum, not sure if for P2 only or also for P1.