A sendmail replacement that can call a REST / Webhook endpoint. You'll get free alerting directly from crontab/smartd/zfs to your monitoring / logging system
Mailit: A Tiny Drop-In REST API to Send Emails
21–30 of 75 posts
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#22Earlier quoted context omitted.
I've looked at setting up sendmail as a "LAMP guy" and I said nope nope nope, just use mailgun.
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
#23It 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…
Playing Devil's advocate: SMTP has some back-and-forth stateful chatter. With a custom HTTP API, you can authenticate and send an email in a single request. SMTP Pipelining can reduce this problem, but not all libraries support it (e.g. Python's smtplib).
So what ? Is not like you implement the SMTP protocol into your application to send emails. Any language under the sun has a SMTP implementation exposed as a library.
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#24Earlier quoted context omitted.
Playing Devil's advocate: SMTP has some back-and-forth stateful chatter. With a custom HTTP API, you can authenticate and send an email in a single request. SMTP Pipelining can reduce this problem, but not all libraries support it (e.g. Python's smtplib).
>SMTP has some back-and-forth stateful chatter. So what ? Is not like you implement the SMTP protocol into your application to send emails. Any language under the sun has a SMTP implementation exposed as a library.
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#25It 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.
[0] https://documentation.mailgun.com/en/latest/quickstart-sendi...
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#26The total opposite of this project would be way more useful : A sendmail replacement that can call a REST / Webhook endpoint. You'll get free alerting directly from crontab/smartd/zfs to your monitoring / logging system
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#27Earlier quoted context omitted.
Playing Devil's advocate: SMTP has some back-and-forth stateful chatter. With a custom HTTP API, you can authenticate and send an email in a single request. SMTP Pipelining can reduce this problem, but not all libraries support it (e.g. Python's smtplib).
>SMTP has some back-and-forth stateful chatter. So what ? Is not like you implement the SMTP protocol into your application to send emails. Any language under the sun has a SMTP implementation exposed as a library.
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#28Earlier quoted context omitted.
>SMTP has some back-and-forth stateful chatter. So what ? Is not like you implement the SMTP protocol into your application to send emails. Any language under the sun has a SMTP implementation exposed as a library.
Another reason i would do is , i have only port 80/443 allowed outside my network. so using https api helps with that
Re: Mailit: A Tiny Drop-In REST API to Send Emails
#29I would think that this is bad design - call a http service that wraps smtp, when pretty much every language has an SMTP client.