Question

Mail not sending on Ubuntu Server.

Posted March 6, 2014 3.8k views
I'm fairly new to Digital Ocean, and recently set up a droplet, that I attached a domain to. The contact page of the website is in php format. I've tested the contact form on another server. It works just fine on that server, but not on the Ubuntu server/droplet I made for the website. PHP is installed, and the page displays properly, but I'm wondering if I need to install a certain PHP module? So far I've installed: php5-snmp, php5-imap & php5-cgi. Afterwards, I restarted apache so that all of the changes would take effect, but I received the following message : "apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName". So then I went into my etc/apache2/httpd.conf file and added the line : ServerName localhost . The contact form still doesn't work on the server.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer
Hi!

Do you have any smtp server configured on this droplet, like sendmail or postfix? I thing the mail() funcion need this, or need an external smtp server configuration on php.ini.
Submit an Answer