| Mobile | RSS

PHP mail function on Linux

July 29th, 2010 | No Comments | Posted in PHP

It was always problem for me to get php mail function to work for me with Linux installation, in Windows machine all you need is to edit the SMTP, and smtp_port to some valid smtp server (usually ISP mail server) and it works. But for Linux it seems that it is not supported; there is only an option for sendmail path.

I read sendmail so I instantly installed sendmail, but it was a failure, come on, it is just a localhost installation and i am testing stuff, it is not production server where you have to be careful about open relays and like issues.

I gave up on sendmail, and read in an article that I can use postfix, but what about the sendmail path option? it turned out that postfix has its own sendmail binary that’s run the same as sendmail. Felt relief, and updated postfix configuration file to relay emails to ISP mail server, because my IP was blacklisted for some reason (Our IPs are shared!!! I hope our ISP fix this issue soon)

Just use postfix with PHP mail function to work :D

This guy gave me hope ;)

Details on how to relay your postfix mail traffic

Leave a Reply 83 views, 1 so far today |
Tags: , ,
  • No Related Post

Leave a Reply