Hello!
This isn’t necessarily Django related, but I want to be able to accept emails and send emails with addresses coming from my domain.
At present I’ve hooked Django up to my GMail account, but this isn’t very professional and it would be nice to have separate emails for contact, circulation, etc. I’d like to be able to send mail from these addresses both manually and through Django.
My question is: What would the best way to implement this be? I’d imagine this is a fairly common problem, but I don’t have any experience with this sort of stuff. Google isn’t being very useful.
Many thanks!
The best/easiest means is to find an email hosting provider that will let you supply your own domain.
It used to be fairly trivial - set up a mail server (I use postfix), create an MX DNS entry and you’re good to go.
Receiving emails is easy - it’s sending the emails that has actually become more difficult. There are an increasing number of domains that are becoming increasingly restrictive regarding the sources of emails they will accept.
If you set up a mail server to receive emails for your domain, then you would be able to send emails through GMail by registering your domain email with gmail. (They make you prove you “own” that email address by sending a confirmation email to it - or at least that’s what they used to do the last time I did this.)
I still receive emails for my domain on my server, but now I’ve switched to my comcast account for sending emails. It just hasn’t been worth the bother doing it any other way. (My volume of outbound emails is small enough that that isn’t an issue.) If I needed to send emails from my domain, I’d definitely be looking at an email service provider. I still receive emails on my domain, because I have processes that act on incoming emails and so need a lot more control over mail routing and handling than simply a POP3 / IMAP account.
Some services you can look at: Sendgrid (I use them for sending a very small amount of email from Django, and it works fine), Postmark, or Mailgun.
As @KenWhitesell says, sending email reliably is surprisingly complicated these days, if you don’t want all of your automated emails to be caught in spam filters.