I've tried to use smtpd
but couldn't get it to work properly (Here's the link to the issue). I only need the server to receive emails and store in database. I've found few like MailGun, and although it looks great it is not free. Any suggestions?

- 1
- 1

- 165
- 4
- 14
-
Why the negative vote? I'm interested in what people are using as their mail servers with django. There's similar question and it didn't get downvoted [Any suggestion for smtp mail server in nodejs?](http://stackoverflow.com/questions/5476326/any-suggestion-for-smtp-mail-server-in-nodejs?rq=1) – user1123975 Feb 20 '16 at 18:31
-
The question you referred is quite old. Meanwhile opinon based and recommendation questions are OT here. If the question you mentioned would cause problems it would get closed too. – bummi Feb 20 '16 at 20:44
1 Answers
There are so many options, it's an opinion question, and also related to the specific use case. So here are the main options you have.
It's mostly your decision and not "with django". The question is really choosing a mail server for a web application.
From the django point of view it's either local server(faster), or external API. As a developer, sending SMTP is probably easier than external API because django already includes the backend handling. But good email service providers usually have a good clients libraries, and it's not that complex to use their API as well.
Your own email server: Install and maintain your own mail server. Pros: cheaper, a cheap VPS will do, no limits on accounts (useful for testings) and mails. Cons: installing a mail server + auth backend etc is not easy if you didn't installed one before, and your emails can be easily marked as spam. If you select this option, Postfix is a safe choice.
External service: with API. Pros: easier to implement, and less chances to be marked as spammer. Cons: more expensive, possible specifc coding against the specific API
Your mail server + external API: the local server connection is much faster, so django sends the email quickly, and then the server handles the slower sending to an external service
Summary: If you just start something, and need a simple email facility, pick an external service that uses SMTP. You will have something up and running, using the very easy django SMTP utilities, without specific coding to the vendor API. Once you need to scale, do the research and pick a more advanced solution.
Note: usually sending email requires some async queue, that allows django to pass the email sending task and continue with the request, without waiting to the smtp connection. SMTP connections can be slow.

- 3,620
- 2
- 22
- 27