- This topic is empty.
-
AuthorPosts
-
July 12, 2011 at 8:11 pm #83314justaguyParticipant
I don’t mean to highjack your time, get back to me as you are able ….
I corrected the lack of closing php, no change. I guess there is only a finite number of ways I can toy with this, so as your able give it a second look.
Thanks d
July 12, 2011 at 10:05 pm #83307dhechlerMemberSorry bout not getting back to ya sooner.
Check this out. http://dev.wovenland.com/justaguy/
thats your code working. lemme get the code i have for ya.
$email = $_POST;
$questions = $_POST;
// subject
$subject = 'Request for Information';
// HTML message
$message = '
' . $email . ' sent you a message.
' . $email. '
'. $questions .'
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "rn";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "rn";
// Additional headers
$headers .= 'To: <' . $_POST . '>' . "rn";
$headers .= 'From: My Web Site' . "rn";
// Mail it
mail($to, $subject, $message, $headers);
//Send them back to the form page with a success message.
// From here is the html to the success page after e-mail was $theResults = <<< EOD
?>
My Web Site/contact
My Web Site
Yada yada
Your request for additional information has successfully been forwarded.
Thank you for your interest in My Web Site.
You can expect a prompt response.
© 2011 My Site / All Rights Reserved.
EOD;
echo "$theResults";
?>
July 13, 2011 at 8:51 am #83285justaguyParticipantThe working code you posted does bring us to the “success” page, without an e-mail being sent. I have changed the opening php tag to include “php”. I’m not certain what the string :
$headers = ‘MIME-Version: 1.0’ . “rn”;
does, but I am by far behind you in knowledge.
Are we certain that we needed to amend the ENCTYPE in the html? I’m just asking ….. again, I trust your knowledge over the lack of mine. I am just thinking about the changes that have been introduced and noting the deficiencies (now) compared to the code and symptoms we had in the beginning.
“old code” —-> email sent, nothing captured, “success” page rendered vs
“new code” —> no email sent, uncertain if data is being captured, and failure of “success” page being rendered (I see that a “success” page is rendered here : http://dev.wovenland.com/justaguy/) but can’t understand why it is failing on the site.
It has to be something quite simple (and evasive) at this point.
I appreciate you hanging in here with me (still)
July 13, 2011 at 9:05 am #83287dhechlerMemberMan, Im not sure why its not sending you an email on my test site. Heres how it all plays out for me.
Fill out form
http://i52.tinypic.com/2dhwuah.jpgGet Confirmation Page
http://i56.tinypic.com/2j3407s.jpgGet Confirmation Email
http://i51.tinypic.com/2i25tva.jpgThe email comes almost immediately. Maybe it’s getting dumped into your spam folder?
July 13, 2011 at 9:12 am #83279justaguyParticipantHere is something beneficial to add!
I have been plugging an alternate (working) email address of mine into the form on the web page itself, and typing gibberish, then hitting the “send” button. As part of the script you’ve put together, the sender (from my web page) receives an e-mail to their e-mail address after completing the form.
This is occurring, the “sender” will receive an email to their inbox and the question they type in the form is remitted to them. The “sender’s” email address is formatted as a link that when clicked opens (in this case) a response through gmail.
A little progress, huh? :-)
July 13, 2011 at 9:15 am #83280justaguyParticipantI guess I just restated what you already knew ………………
July 13, 2011 at 9:17 am #83281dhechlerMemberAHA! So in order for YOU to receive an email, just change this.
// Additional headers
$headers .= 'To: <' . $_POST . '>' . "rn";
$headers .= 'From: My Web Site' . "rn";
to this
// Additional headers
$headers .= 'To:' . "rn";
$headers .= 'From: My Web Site' . "rn";
$headers .= 'Reply-To: <' . $_POST . '>' . "rn";
This way you will receive the email. You can also send them a “Thank you” email with the previous code we were using.
July 13, 2011 at 9:22 am #83282dhechlerMemberCORRECTION. It should be this (sorry bout that)
// Additional headers
$headers .= 'To: [email protected]' . "rn";
$headers .= 'From: My Web Site' . "rn";
$headers .= 'Reply-To: <' . $_POST . '>' . "rn";Basically i removed the <> from the to email.
July 13, 2011 at 9:22 am #83277justaguyParticipantBefore I try the above, this may be helpful, or not, in the form, on the website, I plug in my website e-mail address as “sender” and type gibberish, and no email sent to my web site email address.
July 13, 2011 at 9:26 am #83278dhechlerMemberlet me copy all of the code over for you now. Just so we are both on the same page. Just to make sure.
$email = $_POST;
$questions = $_POST;
// subject
$subject = 'Request for Information';
// HTML message
$message = '
' . $email . ' sent you a message.
' . $email. '
'. $questions .'
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "rn";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "rn";
// Additional headers. FILL IN YOUR EMAIL HERE
$headers .= 'To: [email protected]' . "rn";
$headers .= 'From: My Web Site' . "rn";
$headers .= 'Reply-To: <' . $_POST . '>' . "rn";
// Mail it
mail($to, $subject, $message, $headers);
//Send them back to the form page with a success message.
// From here is the html to the success page after e-mail was $theResults = <<< EOD
?>
My Web Site/contact
My Web Site
Yada yada
Your request for additional information has successfully been forwarded.
Thank you for your interest in My Web Site.
You can expect a prompt response.
© 2011 My Site / All Rights Reserved.
EOD;
echo "$theResults";
?>
July 13, 2011 at 9:54 am #83272justaguyParticipantHold on, something seems amiss, my error no doubt.
July 13, 2011 at 9:55 am #83273dhechlerMemberWhat are you missing?
July 13, 2011 at 9:56 am #83274dhechlerMemberHTML code as well.
justaguy form test
July 13, 2011 at 10:21 am #83268justaguyParticipantGeez! I tried the latest send.php and failed receiving any e-mails, after plugging in all my site/email info into place. Actually I tried a couple of times.
Then I thought, well, I would go back and use the send.php that worked last, the one prior to the last one you submitted. No e-mail.! After making the changes to the “additional headers” and double checking my html.
(what the hell, checkout my site here: nearnorthwebdesign.com
stepping out for a smoke)
July 13, 2011 at 10:31 am #83266dhechlerMemberWell, in looking at your form code on http://www.nearnorthwebdesign.com/contact.html, you have this.
There are 2 problems i see with this form code.
1. contactFormprocess.php does not exist on your server. I get a 404 page when i click submit.
2. your enctype=”text/plain” will not submit anything to your php file.
Delete your enctype=”text/plain”. You dont need it at all.
Create contactFormprocess.php on your server and insert the latest send.php code I’m including here.
$email = $_POST;
$questions = $_POST;
// subject
$subject = 'Request for Information';
// HTML message
$message = '
' . $email . ' sent you a message.
' . $email. '
'. $questions .'
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "rn";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "rn";
// Additional headers. FILL IN YOUR EMAIL HERE
$headers .= 'To: [email protected]' . "rn";
$headers .= 'From: My Web Site' . "rn";
$headers .= 'Reply-To: <' . $_POST . '>' . "rn";
// Mail it
mail($to, $subject, $message, $headers);
//Send them back to the form page with a success message.
// From here is the html to the success page after e-mail was $theResults = <<< EOD
?>
My Web Site/contact
My Web Site
Yada yada
Your request for additional information has successfully been forwarded.
Thank you for your interest in My Web Site.
You can expect a prompt response.
© 2011 My Site / All Rights Reserved.
EOD;
echo "$theResults";
?>
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.