Author Options:

SMTP to send email directly to a client Answered

I have a project idea to create a BTRD, or Beer Theft Reporting Device. (Yeah, I need to come up with a more creative name... :P) The idea is to use an ESP32 microcontroller connected to an accelerometer and 6 pressure sensors mounted to a board, on top of which sits a six-pack. I do see a few problems though. hopefully wifi can penetrate the cold metal coffin without too much loss in signal. (I'm afraid the fridge may end up functioning like a faraday cage...)

Assuming that isn't going to be a problem, I have been googling around trying to figure out if it would be possible to send automated emails from this device to inform of potential theft. Since I am not concerned about receiving emails at all, It seems overkill to have to use SMTP to send the mail I want to send to some server first, which then itself forwards the email on over through the internet over to a client. Is it possible to simply send the SMTP email directly to the recipient? I mean, if this is a product that I sell, then I would not want the end user to have to bother too much with configuring the device too much.


To enable it to send mail out the end user will inevitably have to configure it with outgoing e-mail server settings to enable SMTP relay via a mail provider. Without this you'll struggle to get reputable mail servers to accept mail from it.

If you wanted to supply something that just works right out of the box you'll have to set-up what is effectively a 'cloud hosted' solution where by default it communicates with a mail server you have provisioned and the end user needs only enter the notification/recipient address.

huh, Interesting. I have never been a fan of cloud-based solutions, though. Why would mail servers ignore the mail? Is it because it didn't send the email with TLS connection? Or because they do not recognize / whitelist the IP address of the server as a known and trusted email server?


5 months ago

You cannot steal beer without opening that cool Faraday cage !