hi,
i run the below code i got the below error when i run in my local system.And i placed same program in website it works fine.plz tell that what's the mistake in that.
[php]
<?php
$to ="aa@gmail.com" ;
$subject = "Site Registration Confirmation";
$message = '<html>
<head>
<title>Site Registration Confirmation</title>
</head>
<body style=font-family:verdana, arial; font-size: .8em;>
You filled out a registration form
<br/><br/>
</body>
</html>';
//headers type to sent the mail
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: Normal\n";
// from address is take what ever we want
$from = "me@example.com ";
$headers .= "From: $from";
//mail function
mail($to,$subje ct,$message,$he aders);
?>
[/php]
error :Warning: mail(): "sendmail_f rom" not set in php.ini or custom "From:" header missing in e:\project\Data Mining\mailchec k.php on line 22
i run the below code i got the below error when i run in my local system.And i placed same program in website it works fine.plz tell that what's the mistake in that.
[php]
<?php
$to ="aa@gmail.com" ;
$subject = "Site Registration Confirmation";
$message = '<html>
<head>
<title>Site Registration Confirmation</title>
</head>
<body style=font-family:verdana, arial; font-size: .8em;>
You filled out a registration form
<br/><br/>
</body>
</html>';
//headers type to sent the mail
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: Normal\n";
// from address is take what ever we want
$from = "me@example.com ";
$headers .= "From: $from";
//mail function
mail($to,$subje ct,$message,$he aders);
?>
[/php]
error :Warning: mail(): "sendmail_f rom" not set in php.ini or custom "From:" header missing in e:\project\Data Mining\mailchec k.php on line 22
Comment