Live data from Hacker News

Mailit: A Tiny Drop-In REST API to Send Emails

github.com

51–60 of 75 posts

Re: Mailit: A Tiny Drop-In REST API to Send Emails

#51
post #33

I really like this approach. Let's say you want to build a first beta. You are going to use your own server for sending mail to reduce costs and also not introduce dependencies early on. There are two ways to do it: 1. Call the SMTP library like some here suggested. 2. Create your own encapsulation of the SMTP functionality, and call these functions to send email. It is obvious why you want to use 2. But, from experi…

For a first beta (MVP?) I would strongly advice against using your own mail server. It takes a while for a server to build up a reputation, hence mails from an "unknown" server are quicker marked as spam (especially by common services like gmail and outlook). Instead configure a local sendmail (so you have all the benefits of local mail delivery, like queuing and availability so on) to relay through your provider's m…

MailIt doesn't provide a SMTP server.

Instead it takes your existing SMTP settings, so you can take the advantage of your existing reputation, or your provider's one.

(assuming you already have an email account somewhere, and it can be gmail, outlook, [popularprovider]...)

Re: Mailit: A Tiny Drop-In REST API to Send Emails

#55

It 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…

We were sending email via SMTP from our Android apps for a while until we ran into quite a few cases where SMTP was blocked at the router level. We had to move to HTTP mailing to let the mails go through.

Re: Mailit: A Tiny Drop-In REST API to Send Emails

#57
Love the idea.. although we can call SMTP directly, having the SMTP APIs encapsulated with a HTTP interface is pretty neat. Plus its a readymade microservice that you just spin up and use.

I worked for 2 years on a monolith that used to call SMTP directly and it was a pain to debug.

Re: Mailit: A Tiny Drop-In REST API to Send Emails

#59
post #54
post #52

Is there some kind of a template out there to create the API documentation used by this project?

Looks like it is using https://www.npmjs.com/package/swagpi

Err.. Didn't bother to check dependencies. So this is just a UI generated on top of swagger. Thanks for pointing that out :)

Re: Mailit: A Tiny Drop-In REST API to Send Emails

#60
post #33

I really like this approach. Let's say you want to build a first beta. You are going to use your own server for sending mail to reduce costs and also not introduce dependencies early on. There are two ways to do it: 1. Call the SMTP library like some here suggested. 2. Create your own encapsulation of the SMTP functionality, and call these functions to send email. It is obvious why you want to use 2. But, from experi…

I don't really understand what you gain from this. SMTP is much more widespread than this API. If you want to migrate to a service later on, all you need to do is change the hostname to that service, how much easier is it to have to babysit a service in a container?
Post reply on HN