Jump to content

[SOLVED] Contact form error


howlingwolf

Recommended Posts

<?PHP

$to = "[email protected]";

$subject = "MarinaPi";

$e = $_POST['email_txt'];

$message = "Name:" . $_POST['name_txt'];

$message .= "\nE-mail: " . $e;

$message .= "\nPhone: " . $_POST['phone_txt'];

$message .= "\n\nMessage: " . $_POST['message_txt'];

$headers = "From: $e";

$headers .= "\nReply-To: $e";

$sentOk = mail($to,$subject,$message,$headers);

echo "sentOk=" . $sentOk;

?>

 

 

I am getting "error sending message"

 

Maybe I need to upload contact.fla as?

 

Cheers guys

I am not sure whats wrong on your end But I just tested your code and it works for me?

 

Well thats the thing - my webpage host is telling me that my form doesn't work bcs of my code error and I was suspecting that it can be bcs of their restrictions. Despite that i wanted someone else to test the code and confirm that. If there are more guys who can test it on their end and confirm that I will go back to the host and see what the real issue is.

 

Thank you for testing it

H

 

How can I configure it to go on port 26?

 

Thank you

 

 

 

 

<?PHP

$to = "[email protected]";

$subject = "MarinaPi";

$e = $_POST['email_txt'];

$message = "Name:" . $_POST['name_txt'];

$message .= "\nE-mail: " . $e;

$message .= "\nPhone: " . $_POST['phone_txt'];

$message .= "\n\nMessage: " . $_POST['message_txt'];

$headers = "From: $e";

$headers .= "\nReply-To: $e";

$sentOk = mail($to,$subject,$message,$headers);

echo "sentOk=" . $sentOk;

?>

 

you should really ask your host what port they recommend you use.

 

but you can use:

 

ini_set ('smtp_port', '26');

 

place that at the top of you mail script.

 

your host should really provide this stuff for you.  if not, they're not much of a host, now are they.

i don't get that last line you have either: echo "sentOk=" . $sentOk;

 

you can't echo out the mail() function.

 

thing is, you error handling isn't helping much.  just a "error sending message" doesn't help.  check your error logs on the server.

you should really ask your host what port they recommend you use.

 

but you can use:

 

ini_set ('smtp_port', '26');

 

place that at the top of you mail script.

 

your host should really provide this stuff for you.  if not, they're not much of a host, now are they.

 

 

First of all I want to thank you as my contact form works now,

 

and no they are really bad and I spend somuch time with their customer support, I am really disapointed.

 

Again thank you and thanks everyone who was in this from start.

 

Cheers

 

 

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.