error in mail() function!

Problems with the Windows version of XAMPP, questions, comments, and anything related.

error in mail() function!

Postby weblizzer » 06. December 2006 16:33

hello everyone! i already configure my mail server in order to work my mail() function and i use mercury mail instead of sendmail. but i have a problem because my simple code in sending mail on localhost doesn't work! this is my code
---------------------------------------------------------
$to='myname@localhost';
$subject="Viewers Comments and Feedback!";
$header ='postmaster@localhost';
$message= $_POST[message];
mail($to,$subject,$message,$header);
--------------------------------------------------------
and i got an error! here:

mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in

--------------------------------------------------------

does anyone know about this? or is there any configuration that i will do! Thanks in Advance
:P
weblizzer
 
Posts: 4
Joined: 06. December 2006 10:58

Postby Wiedmann » 06. December 2006 16:53

Code: Select all
$header ='postmaster@localhost';

mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in

IMHO:
Code: Select all
$header = 'From: postmaster@localhost';


BTW:
Code: Select all
$message= $_POST[message];

Should be:
Code: Select all
$message= $_POST['message'];
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby weblizzer » 06. December 2006 17:09

Thanks dud! you got it!... :lol: :o :D :) :P :wink: 8)
weblizzer
 
Posts: 4
Joined: 06. December 2006 10:58


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 58 guests