|  | Posted by Jeff on 01/09/07 04:25 
Hey
 I'm developing a web site using php 5.2.0. I'm developing the web site on my
 winXP computer. I use IIS as web server (that is a web server running on my
 pc, localhost).
 
 When new users registers to the web site, then I want the web site to send
 an email to the new user, but my mail method fails and give me an error
 message (see below)
 
 This is my code sending the mail:
 mail($email, "test av website", "helloworld");
 
 This is the error message I get:
 Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or
 custom "From:" header missing in C:\Inetpub\wwwroot\demo\registration.php on
 line 24
 
 The problem must be related to the sendmail_from settings in php.ini:
 [mail function]
 SMTP = localhost
 smtp_port = 25
 sendmail_from = it_consultant1@hotmail.com
 
 Could the error be because I haven't configured a mail daemon on my pc? I
 haven't installed exchange or any other mail server program on my pc... But
 I have installed outlook express (i'm sending this email via outlook
 express). Maybe I could set SMTP to the SMTP address my ISP have given me.
 (with ISP I mean here the company that gives me internet access) But that
 will NOT be a SMTP on my pc, maybe that is wrong approach...
 
 I'm stucked here... I just want to test the mail sending functionality
 before I publish the web site.....
 
 Any suggestions?
 
 Jeff
  Navigation: [Reply to this message] |