Php mailer + Godaddy + Qmail + Line Endings = frustration
Posted: Thu Feb 11, 2010 9:57 am
Hello, I am trying to get my client's php form mail that I created running. This is a super simple script that I have used often in the past. So, when I try to send the email (I tried to just get a blank one sent through by typing the address for the contact.php mailer into my browser's address bar) when I do this I get the following page with this message:
Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Hosting\5159112\html\contact.php on line 19
Then when I visit the address given in that page (http://pobox.com/~djb/docs/smtplf.html) it tells me that my "line endings are bare" Please advise on how I can retain the correct line endings. If that is even the problem!
THe server is a Godaddy server running qmail. I've found tons about the problem, but I can't figure out how to implement it. I am obviously not a schooled php user, so don't hesitate to treat me as a know nothing!
Here is my php mailer:
<?php
$name = $_POST['Name'];
$email = $_POST['Email'];
$phone = $_POST['Phone'];
$message = $_POST['Message'];
$sendTo = "me@gmail.com";
$subject = "Message from My Site";
$msg_body = "Name: $name\n";
$msg_body .= "E-Mail: $email\n";
$msg_body .= "Phone: $phone\n";
$msg_body .= "Comments: $message\n";
$header_info = "From: ".$name." <".$email.">";
mail($sendTo, $subject, $msg_body, $header_info);
?>
Thanks for your help,
Mike
Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Hosting\5159112\html\contact.php on line 19
Then when I visit the address given in that page (http://pobox.com/~djb/docs/smtplf.html) it tells me that my "line endings are bare" Please advise on how I can retain the correct line endings. If that is even the problem!
THe server is a Godaddy server running qmail. I've found tons about the problem, but I can't figure out how to implement it. I am obviously not a schooled php user, so don't hesitate to treat me as a know nothing!
Here is my php mailer:
<?php
$name = $_POST['Name'];
$email = $_POST['Email'];
$phone = $_POST['Phone'];
$message = $_POST['Message'];
$sendTo = "me@gmail.com";
$subject = "Message from My Site";
$msg_body = "Name: $name\n";
$msg_body .= "E-Mail: $email\n";
$msg_body .= "Phone: $phone\n";
$msg_body .= "Comments: $message\n";
$header_info = "From: ".$name." <".$email.">";
mail($sendTo, $subject, $msg_body, $header_info);
?>
Thanks for your help,
Mike