I am trying to write a PHP to script to send information from a database via e-mail, I have used the mail command in PHP, I have set the permissions for sendmail and /var/spool/clientmqueue, they all seem OK, but when I access the script from a browser, I get a series of files appear in /var/spool/clientmqueue and the error contained in the is MDeferred: Cannot connect to localhost.
I assume it is trying to send the mail to itself, where is 'localhost' specified?
Will it work if I change it to the address of our external mail server?