Portal Home > Knowledgebase > Articles Database > Unusual email received from form submission


Unusual email received from form submission




Posted by jofield, 11-20-2011, 06:30 AM
I have a form currently working for a client on their website but when information is submitted through it the email that arrives displays the form contents as an .htm file attached to the email rather than just text within the email body. The client hosts with fasthost if this makes a difference as I have done some research on Goggle and found that they do have quite specific requirments. The form is working so I believe I have filled these requirements but can't work out why the responses are coming through as attachments. Does anyone have any idea why and how i can change this please? Any suggestions will be greatly appreciated! Thanks

Posted by jofield, 11-20-2011, 07:05 AM
Not to worry I've fixed it!!! Thanks anyway!

Posted by bear, 11-20-2011, 09:10 AM
Please consider sharing that fix, so the next person has the answer instead of "it's fixed!".

Posted by jofield, 11-20-2011, 09:13 AM
Apologies I didn't think to, how rude of me! All I had to do was remove the following line of code from my text: and it worked!

Posted by jofield, 11-20-2011, 09:38 AM
I am experiencing a different issue now though, one of the forms I have amended also has some checkboxes that were working fine but now only one option displays in the submission email regardless of how many emails are ticked, would anyone know why this is please?

Posted by bear, 11-20-2011, 09:52 AM
Need to see the HTML form, but I suspect they might be radio buttons instead of checkboxes?

Posted by jofield, 11-20-2011, 09:55 AM
Hi Bear, thanks for replying Here's the code for the form if it helps you.

Posted by khunj, 11-20-2011, 09:59 AM
Note that inserting POST variables inside email headers without any verification could lead you into serious troubles. You may consider reading this first: http://www.damonkohler.com/2008/12/email-injection.html The captcha will not prevent that.

Posted by bear, 11-20-2011, 10:06 AM
Here's the issue: The check boxes all have the same name "contact_options". To submit more than one, they need unique names or it acts like radio buttons where only one from each "set" can be selected. With checkboxes, it grabs the first true value and stops looking.

Posted by jofield, 11-20-2011, 10:17 AM
ah okay thanks bear so I should do something like this?? How does this affect the code in my submission file though, what would I need to change here?

Posted by jofield, 11-20-2011, 10:18 AM
Hi Khunj Thanks for your comment. I thought I had added in some verification with this section: Sorry I'm quite new to this and thought I'd got it right!

Posted by bear, 11-20-2011, 11:39 AM
That should work. Since there is no longer a "$contact_options_msg" as previously defined, that's no longer needed. You would need to append these 'new' fields into the email instead. And so on. Replace "Newfield#" and the labels and so on with the actual newly named form fields.

Posted by jofield, 11-20-2011, 12:38 PM
Many thanks Bear, I shall give that a go right now!



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language: