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 controls like rate limiting in place - again so you don't just get rejected as spam.
Honestly, I would welcome a complete ground up re-implementation of email - SMTP, POP/IMAP and all. The "very simple protocol, that's matured for decades now" is really just a mess of different protocols - different authentication models, different encryption methods, etc and all operating without a standard format for error handling. Plus all of the additional bloat bolted on to handle the swell of abuse that the email "network" has had to endure. There's nothing simple about email any more.
However going back to the topic: the unfortunate thing about this REST API is it seeks to solve the least complicated part of the whole SMTP stack.
I'd welcome that too, it's kinda sad nobody succeeded with "email 2.0", sure we have lots of attempts but I can't recall any major players. The best solutions to "fix email" were companies that advocated to not use email and use their closed platform.
What I can think of would be cool is something XMPP based with email fallback.
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.
Sorry, "its name was" :)
Still forget that rule sometimes.
[0] https://documentation.mailgun.com/en/latest/quickstart-sendi...
Using an HTTP API for this is a massive overkill.
* I'm aware using utf-8 like this may confuse older clients but I didn't have problem with anything relatively modern I tested the receiving on.
I wouldn't call it massive overkill. REST is extremely simple as well. You have to make an request anyways so it's just a question of preference how you connect to that the email sending service.
Do you implement your own HTTP communication every time you need it or do you use a library?
Just as for HTTP there are many good libraries for SMTP communication that you can easily use. No need to roll your own.
You're running a web server to emulate telnet. It's a massive overkill.