Jump to content

Recommended Posts

want to use a php script (works partially - sends a message to my inbox) but want it to work also to send a message to the sender. like, 'thank your for your email - we will reply usually within 2 days.'

 

I am a dummy when it comes to this and been trying to see the catch but nothing works.

 

anybody with some time to kill for a helping hand in this darkness?

 

 

<?

if(!empty($HTTP_POST_VARS['sender_mail']) || !empty($HTTP_POST_VARS['sender_message']) || !empty($HTTP_POST_VARS['sender_subject']) || !empty($HTTP_POST_VARS['sender_name']))

{

$to = "henk@seriousseeds.com";

$subject = stripslashes($HTTP_POST_VARS['sender_subject']);

$body = stripslashes($HTTP_POST_VARS['sender_message']);

$body .= "\n\n---------------------------\n";

$body .= "Mail sent by: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail']  . ">\n";

$header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";

$header .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";

$header .= "X-Mailer: PHP/" . phpversion() . "\n";

$header .= "X-Priority: 1";

if(@mail($to, $subject, $body, $header))

{

echo "output=sent";

} else {

echo "output=error";

}

} else {

echo "output=error";

}

?>

Link to comment
https://forums.phpfreaks.com/topic/84997-solved-help-me-plaese-with-my-mailform/
Share on other sites

×
×
  • 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.