Mailit: A Tiny Drop-In REST API to Send Emails
41–50 of 75 posts
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#42It migt be just me, but I honestly don't understand why people would use an HTTP API to send mail. SMTP really is a very simple protocol, that's matured for decades now. Also it is fully specified by RFCs. I can see why mail services that provide templating (eg Mandrill) have special APIs, they offer something different from sending regular emails. This specific REST API seems more like a standin for sendmail, which…
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
#43Earlier quoted context omitted.
I've looked at setting up sendmail as a "LAMP guy" and I said nope nope nope, just use mailgun.
You still need to set up the SMTP server with this solution. Creating the relay is the hard part of any mail service because even SMTP aside, you need to set DNS entries on your FROM domain to authorise your SMTP relay's IP (otherwise spam filters will just block your email). And if it's regular commercial mailshots then you'd need to register with one of the trusted services (which isn't free) and have all sorts of…
Update: I just did this google search:
java and email book david wood
and looked at the results.
The first hit is that book - it's name was actually Programming Internet Email - and it was by O'Reilly Media:
http://shop.oreilly.com/product/9781565924796.do
It has info on both the fundamental concepts and protocols of email, as well as examples in both Perl and Java.
Other results of that search show that there are multiple books about programming email (as can be expected), including a list of books about Internet email on an Oracle site:
Books on the JavaMail API and Internet Mail:
http://www.oracle.com/technetwork/java/javamail/index-139773...
Not all of those are exclusively about email, and some probably have overlapping content, but still, it shows (as Wood's book did too) that it is a big topic:
JavaMail API, by Elliotte Rusty Harold.
Internet Email, by David Wood.
Programmer's Guide to Internet Mail, by John Rhoton.
Internet Email Protocols: A Developer's Guide, by Kevin Johnson.
Java Network Programming, 2nd Edition, by Elliotte Rusty Harold.
Essential Email Standards: RFCs and Protocols Made Practical, by Pete Loshin.
Internet Messaging: From the Desktop to the Enterprise, by Marshall T. Rose and David Strom.
Internet E-Mail: Protocols, Standards, & Implementation, by Lawrence Hughes.
Managing IMAP, by Dianna Mullet and Kevin Mullet.
Professional Java Server Programming J2EE Edition.
Java Cookbook: Solutions and Examples for Java Developers, by Ian F. Darwin.
JavaServer Pages (JSP) Fast & Easy Web Development, by Aneesha Bakharia.
[1] From what I read about David Wood, he seemed to have a lot of experience with email (and other stuff) and had for some time, a company providing products and/or services in that area.
http://www.oreilly.com/pub/au/565
And that Java Cookbook by Ian Darwin is pretty good too - I have it.
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#44Earlier quoted context omitted.
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.
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?
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
#45Could do with an end-point to do some basic validation of email addresses. I.e a syntax check, and also a DNS check to make sure that the domain has MX or A/AAAA records, and potentially a check to make sure that there is an SMTP server listening at the destination on port 25. Perhaps all 3 of those things configurable at request time.
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#46Earlier quoted context omitted.
Another reason i would do is , i have only port 80/443 allowed outside my network. so using https api helps with that
Why is that? What security does it provide? This very project just demonstrated that you can send pretty much anything in HTTP(S) so any malware (I presume) you're trying to defeat can do the same.
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#47Re: Mailit: A Tiny Drop-In REST API to Send Emails
#48But curl can already send email through SMTP directly.
I'm sure the author has a good reason for creating this but it needs a better example.
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#49Earlier quoted context omitted.
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?
> 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 interf…
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.
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#50It migt be just me, but I honestly don't understand why people would use an HTTP API to send mail. SMTP really is a very simple protocol, that's matured for decades now. Also it is fully specified by RFCs. I can see why mail services that provide templating (eg Mandrill) have special APIs, they offer something different from sending regular emails. This specific REST API seems more like a standin for sendmail, which…
I've looked at setting up sendmail as a "LAMP guy" and I said nope nope nope, just use mailgun.