Page 1 of 1

sending mail from linux using external mail server

Posted: Fri May 07, 2010 10:04 am
by phpBever
My reading suggests that with a Windows installation one can indicate an SMTP server that is not on the local host. But it seems to imply that from a Linux installation one needs to use a locally running sendmail. Is there any way I can use the mail() function and have the mail sent from my SMTP server where my domain is hosted (and where my Evolution mail gets sent from)? I haven't seen any indication of how to do that. I've tried to set up my php.ini following the Windows model, but that doesn't seem to work.

Thanks.

Re: sending mail from linux using external mail server

Posted: Fri May 07, 2010 10:11 am
by flying_circus
I had this same problem a month or two ago. You can reach your goal, but not with mail(). There are pure PHP solutions to use external SMTP server's that also allow you to use authentication as well. The solution I ended up using was Swift Mailer.

Re: sending mail from linux using external mail server

Posted: Fri May 07, 2010 12:57 pm
by phpBever
Looks promising. Thanks. My hosted server for production probably won't have this problem but I like to be able to test things locally on my own box.