I'm having trouble getting the PHP's mail() function to work on my localhost laptop computer. I'm using Ubuntu 9.04 and I connect to a wireless network at home for internet. I ran the following command in terminal:
sudo apt-get install postfix
Everything looked fine. I didn't see any errors. When I ran the
mail('firstname.lastname@example.org', 'Subject', 'Message', 'From: localhost <email@example.com>')
in PHP, the function returned true. But even though it returned true, I never got the emails in my hotmail account.
Did I miss a step?
I looked at my mail.log, and it says my connection is timed out:
Nov 7 00:36:30 john-laptop postfix/pickup: BB7E14F00AD: uid=33 from=<www-data> Nov 7 00:36:30 john-laptop postfix/cleanup: BB7E14F00AD: message-id=<20091107053630.BB7E14F00AD@john-laptop> Nov 7 00:36:30 john-laptop postfix/qmgr: BB7E14F00AD: from=<www-data@john-laptop>, size=316, nrcpt=1 (queue active) Nov 7 00:37:03 john-laptop postfix/smtp: connect to mx01.1and1.com[126.96.36.199]:25: Connection timed out Nov 7 00:37:33 john-laptop postfix/smtp: connect to mx00.1and1.com[188.8.131.52]:25: Connection timed out Nov 7 00:37:33 john-laptop postfix/smtp: BB7E14F00AD: to=<firstname.lastname@example.org>, relay=none, delay=63, delays=0.02/0.01/63/0, dsn=4.4.1, status=deferred (connect to mx00.1and1.com[184.108.40.206]:25: Connection timed out)