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 protected]', 'Subject', 'Message', 'From: localhost <[email protected]>')
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[28698]: BB7E14F00AD: uid=33 from=<www-data>
Nov 7 00:36:30 john-laptop postfix/cleanup[29131]: BB7E14F00AD: message-id=<20091107053630.BB7E14F00AD@john-laptop>
Nov 7 00:36:30 john-laptop postfix/qmgr[4088]: BB7E14F00AD: from=<www-data@john-laptop>, size=316, nrcpt=1 (queue active)
Nov 7 00:37:03 john-laptop postfix/smtp[29133]: connect to mx01.1and1.com[74.208.5.4]:25: Connection timed out
Nov 7 00:37:33 john-laptop postfix/smtp[29133]: connect to mx00.1and1.com[74.208.5.3]:25: Connection timed out
Nov 7 00:37:33 john-laptop postfix/smtp[29133]: BB7E14F00AD: to=<[email protected]>, relay=none, delay=63, delays=0.02/0.01/63/0, dsn=4.4.1, status=deferred (connect to mx00.1and1.com[74.208.5.3]:25: Connection timed out)
hmm...