i used the below mentioned code mail function didn't work.that means it didn't give any error and also mail didn't receive.plz tell that what's the mistake
and my php.ini contains
Expand|Select|Wrap|Line Numbers
- [mail function]
- ; For Win32 only.
- SMTP = localhost ; for Win32 only
- sendmail_from= me@localhost.com ; for Win32 only
- SMTP_PORT=25;
- ; For Win32 only.
- sendmail_from = me@example.com
- SMTP_PORT=25
<?php
ini_set ("SMTP","localhost");
ini_set("SMTP_PORT","25");
$to ="__MUNGED__";
$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,$subject,$message,$headers);
?>
[/php]