Wow, this is an old topic.
Integration with a locally installed emailer (e.g. sendmail or postfix) is available OOTB from the settings -> email panel.
I have setup mailgun as email service provider from Admin >> settings >> Email >> SMTP Transport. It works perfect for few hours (number of hours yet to determine), but stops working after few hours. When I save the mailgun credentials again, it starts working and same thing happens after few hours.
What might be the reason behind this issue? How to solve this issue?
Are there any errors in the server logs?
If you go to MailGun's site, there might be information there.