HELP PLEASE PHP ERROR WITH MAIL
Posted: Wed Feb 04, 2009 5:59 pm
Hello!! thanks for reading my message i got a php mail script but i cant make it work, my smtpout server requires authentication and i dont know how to put it on the script i got something like this and it doesnt work
<?php
/**
*
*
*/
// set this to your email address
$to = "rodrigo@holboxdesign.com";
$host = "smtpout.secureserver.net"
$username = "rodrigo@holboxdesign.com";
$password = "ev252omxo";
// shouldn't need to change anything past this line
$from = $_POST['formName'];
$email = $_POST['formEmail'];
$message = $_POST['formMessage'];
$headers = "From: " . $_POST['formName'] . " <" . $_POST['formEmail'] . ">\n";
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
// set the message to whatever you'd like
$subject = "Message from MD Portfolio Site";
$body = "From: $from\n E-Mail: $email\n Message:\n\n $message";
$mail = $smtp->send($to, $subject, $body, $headers);
$sendStatus = "success";
echo $sendStatus;
?>
when i run this code php dont say nothing about mail or anything on the error log
but if i run this code
<?php
/**
*
*
*/
// set this to your email address
$to = "rodrigo@holboxdesign.com";
// shouldn't need to change anything past this line
$from = $_POST['formName'];
$email = $_POST['formEmail'];
$message = $_POST['formMessage'];
$headers = "From: " . $_POST['formName'] . " <" . $_POST['formEmail'] . ">\n";
// set the message to whatever you'd like
$subject = "Message from MD Portfolio Site";
$body = "From: $from\n E-Mail: $email\n Message:\n\n $message";
mail($to, $subject, $body, $headers);
$sendStatus = "success";
echo $sendStatus;
?>
Php error log says this
[04-Feb-2009 17:59:05] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 553 Sorry, that domain isn't in my list of allowed rcpthosts. in C:\wamp\www\holbox\php\mail_script.php on line 19
pls help me PLSSSSSSS

<?php
/**
*
*
*/
// set this to your email address
$to = "rodrigo@holboxdesign.com";
$host = "smtpout.secureserver.net"
$username = "rodrigo@holboxdesign.com";
$password = "ev252omxo";
// shouldn't need to change anything past this line
$from = $_POST['formName'];
$email = $_POST['formEmail'];
$message = $_POST['formMessage'];
$headers = "From: " . $_POST['formName'] . " <" . $_POST['formEmail'] . ">\n";
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
// set the message to whatever you'd like
$subject = "Message from MD Portfolio Site";
$body = "From: $from\n E-Mail: $email\n Message:\n\n $message";
$mail = $smtp->send($to, $subject, $body, $headers);
$sendStatus = "success";
echo $sendStatus;
?>
when i run this code php dont say nothing about mail or anything on the error log
but if i run this code
<?php
/**
*
*
*/
// set this to your email address
$to = "rodrigo@holboxdesign.com";
// shouldn't need to change anything past this line
$from = $_POST['formName'];
$email = $_POST['formEmail'];
$message = $_POST['formMessage'];
$headers = "From: " . $_POST['formName'] . " <" . $_POST['formEmail'] . ">\n";
// set the message to whatever you'd like
$subject = "Message from MD Portfolio Site";
$body = "From: $from\n E-Mail: $email\n Message:\n\n $message";
mail($to, $subject, $body, $headers);
$sendStatus = "success";
echo $sendStatus;
?>
Php error log says this
[04-Feb-2009 17:59:05] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 553 Sorry, that domain isn't in my list of allowed rcpthosts. in C:\wamp\www\holbox\php\mail_script.php on line 19
pls help me PLSSSSSSS