having some problem related to "execution of email code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
haiderips
Forum Newbie
Posts: 4
Joined: Sat Jun 02, 2007 9:08 am

having some problem related to "execution of email code

Post by haiderips »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hello friends, i have some problem related to my PHP Mail function.
       i am Using IIS as my webSrver and write the code same as

Code: Select all

<?php 
$email_to = "haider.athar@gmail.com";
$email_subject = "Hai everybody" ;
$email_body = "i am sending my code with my problem please help me to solve it ";

if(mail($email_to, $email_subject, $email_body))
             {
    
	echo "The email($email_subject) was successfully sent.";
	
	}
 else 
{
    echo "The email($email_subject) was NOT sent.";
}
?>
but the problem is , when i goes to execute this code on any Browser or any IDE , i encoutered the error same as

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Inetpub\wwwroot\wwwroot\mail\mail.php on line 6

but i already have been set all tags in php.ini
so please reply me, what should i do to execute this code.
thanku


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Post Reply