toker Posted January 8, 2008 Share Posted January 8, 2008 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 More sharing options...
Coreye Posted January 8, 2008 Share Posted January 8, 2008 You should post this on the "PHP Help" board. http://www.phpfreaks.com/forums/index.php/board,1.0.html Link to comment https://forums.phpfreaks.com/topic/84997-solved-help-me-plaese-with-my-mailform/#findComment-433421 Share on other sites More sharing options...
thewooleymammoth Posted January 10, 2008 Share Posted January 10, 2008 and use the [ code ] tags (no spaces) Link to comment https://forums.phpfreaks.com/topic/84997-solved-help-me-plaese-with-my-mailform/#findComment-436065 Share on other sites More sharing options...
Recommended Posts