View Single Post
  #5 (permalink)  
Old July 15th, 2004, 06:35 PM
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

Nik's post pretty much says it. You have to specify an SMTP server in php.ini to use PHP's mail functionality in Windows.

An SMTP server is a server that sends your mail. Outlook doesn't have anything to do with that. Outlook is a mail client, it communicates with servers that send and receive mail. You can specifiy an SMTP server in php.ini via an ISP.. such as mail.yourhost.com, or you can install an SMTP server on Windows and use that to send mail.

One free SMTP server is:
http://www.postcastserver.com/

Then all you have to do is set up the SMTP host name in postcastserver. The easiest way is to just use localhost.

Then in php.ini you modify the SMTP directive.
Code:
[mail function]
; For Win32 only.
SMTP = localhost ; for Win32 only
sendmail_from= me@localhost.com ; for Win32 only
Update the SMTP directive with the hostname of your SMTP server. Now the mail function works.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
Reply With Quote