...

View Full Version : SMTP prob



dsylebee
09-18-2009, 10:25 PM
hi all im using a Windows Hosting under IIS 7.0 from Godaddy.com , and its a pain my mail function won't work anymore..

it gives me the error 451


Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Hosting\3137332\html\newpahad\sendto.php on line 29


here is my code if you can help me :)



<?php
session_start();

include("sql.php");

$to = $_POST["to"];
$psubject = stripslashes($_POST["subject"]);
$ptitle = stripslashes($_POST["title"]);
$pcontent = stripslashes($_POST["content"]);


$subject = $psubject;

$message = '
<html>
<body>
<center><span style="color: royalblue; font-size: 11pt; font-family: Verdana;">' . $ptitle . '</span></center>
<p style="font-size: 9pt; font-family: Verdana;">' . nl2br($pcontent) . '</p>
</body>
</html>
';


$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: Pahad David <pahaddavid.maguy@hotmail.com>' . "\r\n";


if( mail($to, $subject, $message, $headers) )
{

}
else
{
$newm = "Le email suivant na pas pu recevoir le email du script de nouvelles DNMS: " . $to;
mail("pahaddavid.maguy@hotmail.com", "Envoi de email non reussi", $newm, $headers);
}

/*echo '<script language="javascript"> location.href="functions.php"; </script>';*/
?>

bcarl314
09-20-2009, 05:18 AM
I seem to recall that godaddy doesn't allow mail to be sent using PHP on their windows platforms.

According to MS, the error you're getting shows a server mis configuration:
http://technet.microsoft.com/en-us/library/dd439372.aspx



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum