News for hackers. Stuff that matters.
Re:Mailit: A Tiny Drop-In REST API to Send Emails by pmlnr on Tuesday August 01, 2017 @05:14AM (#14898932)
Sendmail is everything but simple. The question was SMTP in general, which indeed is an extremely simple protocol. Here, this is how you send a plain text* mail in python: https://petermolnar.net/not-mime-email-python-3/

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.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by beaconstudios on Tuesday August 01, 2017 @05:53AM (#14899113)
nowadays you have the option of using postfix+dovecot, which for me at least seems to be a lot easier.
Re:Mailit: A Tiny Drop-In REST API to Send Emails by kowdermeister on Tuesday August 01, 2017 @05:22AM (#14898968)
Sending is not the tricky part, implementing it right is probably another story.

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.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by bjpbakker on Tuesday August 01, 2017 @05:29AM (#14899004)
> implementing it right is probably another story

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.

Re:Mailit: A Tiny Drop-In REST API to Send Emails by pmlnr on Tuesday August 01, 2017 @05:26AM (#14898984)
> I wouldn't call it massive overkill.

You're running a web server to emulate telnet. It's a massive overkill.