My Operating System is Linux Ubuntu 10.10, which was installed about a month ago. Shortly afterwards, I installed the most current versions of Apache2, PHP, and MySQL. All of the above is working quite well. I am developing my website using PHP, and has been working quite well using localhost as the server environment, at least until I go live on the Internet. However, I want to be able to send an email to the customer giving the details of the order.
I have installed Sendmail in the Terminal Window using ‘sudo apt-get install sendmail’, and then ‘sudo sendmailconfig’. Then I input '/usr/sbin/sendmail [email protected] < “Hello.” in the Terminal Window, and get ‘bash: Hello.: No such file or directory’. Of course, I use my real username in the example above.
Then I created a PHP file named firstmail.php, and had the following in it:
The browser screen goes blank, and I get no email. There aren’t even any error messages, so I don’t know why it’s not working.
Then I think that maybe there’s a configuration problem, so I go to /etc/php5/apache2/php.ini, and set the sendmail_path = /usr/sbin/sendmail. Still I get nothing. Then I go to /etc/php5/cli/php.ini and set sendmail_path = /usr/sbin/sendmail, and still get nothing. There are no other php.ini files on my PC.
After extensive study I do not know why my emails aren’t being sent, and I don’t know where to turn next. If anyone knows how to help me with this, I would greatly appreciate it.