Sendmail for contact form

March 3, 2014 5k views
Hi there I followed the initial setup for Digital Ocean droplets (Ubuntu 13.04) and configuring an Nginx/PHP server - so far so good. However, simple PHP contact forms can't send mail. I've read about Sendmail, Postfix etc for this, but they seem like they require extensive troubleshooting and configuration just to be able to send email. Is there a simple way to be able to PHP mail() without worrying about configuring domains, users, worrying about spam or troubleshooting yet another complex config? Thanks.
1 Answer
The easiest way would be using a service such as Mandrill (which offers a nice free tier). You could install sendmail but if you decide to go that route, you'll need to set up SPF records to ensure that your mail doesn't get marked as spam:

You can install sendmail by running the following command:
sudo apt-get install sendmail
by Pablo Carranza
A carefully tailored SPF record will reduce the likelihood of your domain name getting fraudulently spoofed and keep your messages from getting flagged as spam before they reach your recipients.
Have another answer? Share your knowledge.