tags:

views:

6

answers:

1

I'm using XAMPP for Mac, and it seems that the mail function doesn't work. I've tried changing from using sendmail to use SMTP (gmail) without luck. Now my php.ini looks like:

[mail function]
SMTP = smtp.gmail.com
smtp_port = 465
smtp_ssl=auto
auth_username=[user]@gmail.com
auth_password=[pass]
sendmail_from=[user]@gmail.com

If I do "tail -f /var/log/mail.log":

Oct 20 18:07:48 mymac postfix/master[17166]: daemon started -- version 2.5.5, configuration /etc/postfix
Oct 20 18:07:48 mymac postfix/pickup[17168]: 6E89FCA7960: uid=-2 from=<nobody>
Oct 20 18:07:48 mymac postfix/cleanup[17170]: 6E89FCA7960: message-id=<[email protected]>
Oct 20 18:07:48 mymac postfix/pickup[17168]: 736D7CA7961: uid=-2 from=<nobody>
Oct 20 18:07:48 mymac postfix/cleanup[17170]: 736D7CA7961: message-id=<[email protected]>
Oct 20 18:07:48 mymac postfix/qmgr[17169]: 6E89FCA7960: from=<[email protected]>, size=310, nrcpt=1 (queue active)
Oct 20 18:07:48 mymac postfix/qmgr[17169]: 736D7CA7961: from=<[email protected]>, size=417, nrcpt=1 (queue active)
Oct 20 18:08:19 mymac postfix/smtp[17174]: connect to ASPMX.L.GOOGLE.com[209.85.227.27]:25: Operation timed out
Oct 20 18:08:19 mymac postfix/smtp[17176]: connect to ASPMX.L.GOOGLE.com[209.85.229.27]:25: Operation timed out

Anyone managed to get the PHP mail() function to work in XAMPP for Mac? I don't care SMTP, sendmail, whatever. Running out of ideas...

A: 

Is this your local home machine, or a hosted server somewhere. Some ISPs firewall off the SMTP ports (25 & 465) to anything but their own SMTP server, as an anti-spam measure (can't send penis spam if you can't talk to port 25/465). Try using your ISP's/provider's own SMTP server for a test and see if that goes through.

You could try port 587 (submission), which is somewhat of an alternate method, but no guarantee it works. Google might not be listening for that.

Marc B