View Single Post
 
Old December 15th, 2003, 03:39 AM
richard.york's Avatar
richard.york richard.york is offline
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Oh and for Chris's problem:
Quote:
quote:
The one problem i did find with sending emails is when the page was hosted on my own pc (eg using localhost) i was unable to send emails even when connected to the internet, however when i put the page onto my ISP's site the email was sent.
In Windows (Just assuming that's what you're using) you must explicitly enter an SMTP server for PHP to send mail. This can be either a remote SMTP server e.g. smtp.mydomain.com or you may install an SMTP server on Windows and refer to it via localhost or computer name. I like the latter option and use Post Cast Server, which is a free fully featured SMTP server for Windows. Available at.. http://www.postcastserver.com.

Unfortunately specifing an SMTP server in this way does not work for PHP running on Linux.

Snip from php.ini
[mail function]
; For Win32 only.
SMTP = localhost ; for Win32 only

; For Win32 only.
sendmail_from = me@mydomain.com ; for Win32 only

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::