Php mailer + Godaddy + Qmail + Line Endings = frustration

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
majancart
Forum Newbie
Posts: 1
Joined: Thu Feb 11, 2010 9:50 am

Php mailer + Godaddy + Qmail + Line Endings = frustration

Post by majancart »

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
dejvos
Forum Contributor
Posts: 122
Joined: Tue Mar 10, 2009 8:40 am

Re: Php mailer + Godaddy + Qmail + Line Endings = frustration

Post by dejvos »

Hi,

I don't know almost nobody who has ever run function mail without the problems. So my advice is: "Don't struggle with mail() instead of it use PHPMailer class."

Here is documentation:
http://phpmailer.worxware.com/index.php?pg=tutorial

Here you can get it:
http://phpmailer.worxware.com/index.php?pg=phpmailer

Good luck!
Post Reply