Jump to content

Go Daddy Hosting Issues with Mail Function!


lcdmt

Recommended Posts

Grrr... There seems to be tons of people having this same issue, but the problem is I have little PHP experience and already have a send form that works with me. I get the error code Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. 

 

How can I fix this? Any help would be greatly appreciated. Here's my code on the sendeail file:, I also have the other php file in my contacts page.

 

 

<?php

 

$ip = $_POST['ip'];

$httpref = $_POST['httpref'];

$httpagent = $_POST['httpagent'];

$visitor = $_POST['visitor'];

$visitormail = $_POST['visitormail'];

$notes = $_POST['notes'];

$attn = $_POST['attn'];

 

 

if (eregi('http:', $notes)) {

die ("Do NOT try that! ! ");

}

if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))

{

echo "<h2>Use Back - Enter valid e-mail</h2>\n";

$badinput = "<h2>Feedback was NOT submitted</h2>\n";

echo $badinput;

die ("Go back! ! ");

}

 

if(empty($visitor) || empty($visitormail) || empty($notes )) {

echo "<h2>Go Back - fill in all fields</h2>\n";

die ("Go back! ! ");

}

 

$todayis = date("l, F j, Y, g:i a") ;

 

$attn = $attn ;

$subject = $attn;

 

$notes = stripcslashes($notes);

 

$message = " $todayis [EST] \r\n

Attention: $attn \r\n

Message: $notes \n

From: $visitor ($visitormail)\r\n

Additional Info : IP = $ip \r\n

Browser Info: $httpagent \r\n

Referral : $httpref \r\n

";

 

$from = "From: $visitormail\r\n";

 

mail("[email protected]", $subject, $message, $from);

 

?>

 

<p align="center">

Date: <?php echo $todayis ?>

<br />

Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> )

<br />

 

Attention: <?php echo $attn ?>

<br />

Message:<br />

<?php $notesout = str_replace("\r", "<br/>", $notes);

echo $notesout; ?>

<br />

<?php echo $ip ?>

 

 

Please any help would greatly be appreciated, it sucks I cant figure it out. I read somewhere I need to have an email from godaddy hosting that is from my domain? Is that it? Or is it this mail function?

 

If you can fix it, please just change it in the code if you have the time, because I'm not adept at fixing this myself, if you say I have to fix LF to cr-lf all this stuff, I have no clue how to do all this, thus why I'm here. :/

 

www.lcdmt.com is my site

Sounds like you have an issue with your line endings. I would suggest starting with something simple to ensure the mail function is working normally, then look to fix your line endings.

 

mail('[email protected]', 'test subject', ' here is my message');

 

If that works, then you have to look at your line endings.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.