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('email@example.com', 'Subject', 'Message', 'From: localhost <firstname.lastname@example.org>')
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[220.127.116.11]:25: Connection timed out Nov 7 00:37:33 john-laptop postfix/smtp: connect to mx00.1and1.com[18.104.22.168]:25: Connection timed out Nov 7 00:37:33 john-laptop postfix/smtp: BB7E14F00AD: to=<email@example.com>, relay=none, delay=63, delays=0.02/0.01/63/0, dsn=4.4.1, status=deferred (connect to mx00.1and1.com[22.214.171.124]:25: Connection timed out)