Page 1 of 1

Using a remote SMTP server

Posted: Wed Sep 27, 2006 3:58 am
by mip
I'm disabling sendmail on one of my servers and I'd like all the PHP applications I have running on that server to use an alternative server for sending mail. I've found the following in php.ini but it appears as though specifying a remote SMTP server only works on Windows (I'm using Linux and Apache).

Code: Select all

[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = me@localhost.com

; For Unix only.  You may supply arguments as well (default: 'sendmail -t -i').
;sendmail_path =
How can I get all my PHP allications to use a remote mail server?

Posted: Wed Sep 27, 2006 8:23 am
by Obadiah
i dunno if this is what your looking for exactly but will something like this type of setup work for ya?

Code: Select all

[mail function]
SMTP = smtp.isp.net
sendmail_from = me@isp.net
i found it here http://email.about.com/cs/phpemailtips/qt/et021802.htm

Posted: Wed Sep 27, 2006 8:35 am
by mip
Obadiah wrote:i dunno if this is what your looking for exactly but will something like this type of setup work for ya?

Code: Select all

[mail function]
SMTP = smtp.isp.net
sendmail_from = me@isp.net
i found it here http://email.about.com/cs/phpemailtips/qt/et021802.htm
Yes that's the sort of thing I was hoping for but it appears to only work on Win32. Can anyone prove me wrong? Does the above work on Unix?

Posted: Wed Sep 27, 2006 8:54 am
by Chris Corbyn
Linux ignores the SMTP directive in the ini since almost all *nix systems have sendmail installed. There are mailer libraries available such as Swift Mailer though.

Posted: Wed Sep 27, 2006 11:02 am
by mip
d11wtq wrote:Linux ignores the SMTP directive in the ini since almost all *nix systems have sendmail installed. There are mailer libraries available such as Swift Mailer though.
This is the conclusion I've come to. A shame the SMTP directive is igored. I'm now going to have to change all my applications.