so the question is, would it be "better" to run localhost mta (ie. postfix) or "better" to use 3rd party restful api, embedded in the application, to send email?
i am curious what people would do here.
i find postfix on linux allows much greater flexibility and control. the default sendmail/postfix logging (/var/log/maillog) suits me fine, and you can even set limits via iptables on per uuid's which allows rate-limiting apps.
There are pros and cons to each.
As, fukawi2 states using a local MTA with a smarthost (e.g. SendGrid, Mandril, etc.) gives you a whole lot of built in functionality (queueing, fallbacks, and more) with less configuration. Meaning you don't have to write it into the application yourself.
That said, using a web based mail sending API tends to be faster, as SMTP is a very chatty protocol, (but you need to write queueing and fallbacks yourself).
SendGrid's general recommendation is to use SMTP due to all the built in functionality of a local mail server. However, if speed/server load is more of a concern, Web API might be a better solution.