News for hackers. Stuff that matters.
Re:Mailit: A Tiny Drop-In REST API to Send Emails by w458cmau on Tuesday August 01, 2017 @07:41AM (#14899642)
I want to send mails from embedded devices, similar to e.g. an ESP8266, with intermittent connectivity and a semi-stable power source. An HTTP API seems simpler for me to interface with than SMTP.
Re:Mailit: A Tiny Drop-In REST API to Send Emails by zAy0LfpBZLC8mAC on Tuesday August 01, 2017 @08:04AM (#14899779)
I can't comment on what seems simpler to you, but ... what does intermittent connectivity have to do with whether you transmit the email via SMTP or via HTTP?
Re:Mailit: A Tiny Drop-In REST API to Send Emails by bjpbakker on Tuesday August 01, 2017 @08:11AM (#14899821)
> what does intermittent connectivity have to do with whether you transmit the email via SMTP or via HTTP

SMTP uses a stateful connection where HTTP is basically a single request/response. I.e. the device can close the HTTP connection after a single roundtrip where SMTP requires waiting for server responses after commands and then continuing the request.

Not sure if it's simpler on those devices to use an HTTP interface (because HTTP requires a bit more overhead data) but it might be simpler, sure.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by zAy0LfpBZLC8mAC on Tuesday August 01, 2017 @09:16AM (#14900279)
HTTP runs on top of TCP, which already gives you at least two round trips. Also, if it's a device that's connected via the public internet, you probably should be using TLS, which gives you a couple more round trips.

Really, realistically, if your internet connectivity is too bad to support SMTP, it most likely won't work for HTTP either, and you probably should be using some custom UDP thingy with an appropriate retry strategy.