Setting PHP Mail function on linux for SMTP server
Just unsure how to do this? In my php.ini file, there is the option to set a SMTP server, however, this is for windows?
How can I link my mail function to my SMTP server when php is installed on linux - Ubuntu 10.4. Thanks.
pr0gr4mm3r posted this at 12:08 — 22nd March 2011.
He has: 1,502 posts
Joined: Sep 2006
It looks like PHP's mail function in Linux relies on sendmail which does not easily support external SMTP servers.
I usually just let it send mail from the same server. The negative to that is that if you are on a dynamic IP, they are frequently blacklisted for spam.
For past projects, I used a class called HTMLMimeMail5 (seems to be renamed to RMail). This allows the remote SMTP server to be specified as well as several other options.
benf posted this at 12:58 — 22nd March 2011.
They have: 426 posts
Joined: Feb 2005
ok thanks. I thought that might be the case.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.