hi,
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
[code=ini]
[mail function]
; For Win32 only.
SMTP = localhost ; for Win32 only
sendmail_from= me@localhost.co m ; for Win32 only
SMTP_PORT=25;
; For Win32 only.
sendmail_from = me@example.com
SMTP_PORT=25
[/code]
[php]
<?php
ini_set ("SMTP","localh ost");
ini_set("SMTP_P ORT","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.co m";
$headers .= "From:$from ";
//mail function
mail($to,$subje ct,$message,$he aders);
?>
[/php]
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
[code=ini]
[mail function]
; For Win32 only.
SMTP = localhost ; for Win32 only
sendmail_from= me@localhost.co m ; for Win32 only
SMTP_PORT=25;
; For Win32 only.
sendmail_from = me@example.com
SMTP_PORT=25
[/code]
[php]
<?php
ini_set ("SMTP","localh ost");
ini_set("SMTP_P ORT","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.co m";
$headers .= "From:$from ";
//mail function
mail($to,$subje ct,$message,$he aders);
?>
[/php]
Comment