I'm running Ubuntu 12.04.1 LTS. I know very little about Ubuntu but have the task of administering an Ubuntu server for our hospital intranet. The server is on a virtual machine running Moodle. Moodle sends mail fine and is set to use an SMTP IP address through port 25. However, PHP forms are not sending email properly.
I can't get either of the tests
mail ( 'email@example.com', "Test mail", "Test mail from your server name" );
echo "This is a test." | mail -s Testing firstname.lastname@example.org
I installed exim4-daemon-light but I suppose I may not have configured it correctly. I have done a
sudo /etc/init.d/apache2 reload.
I also tried installing ssmtp but the configuration confuses me.
The server has a folder etc/postfix so I presume that is installed also, so I probably have all kinds of tools, one of which just needs to be configured properly?
After installing ssmtp and changing the config, I get the error sendmail: Cannot open mailhub:25
Can I get someone to help me troubleshoot this or help with the next troubleshooting step?
We have another VM that sends mail fine, but I can't find a difference in config from that one to this one - not sure where all to look though.