When submitting the contact form, the post params from the form are being double url encoded.
So the myemail param, ie the email the contact details will be sent to, is double url encoded, then it gets decoded only once (in send.php by the look of it) and so the final email is wrong and the fails to send:
- required email address: email@example.com
- after one url encode: exmaple%40work.com ( as url encode code for @ is = %40, all OK so far)
- after second url encode example%2540work.com (now the % from first code is again encoded! as %25 )
- after single url decode by php: example%40.work.com
- If I hard code the myemail as a string in send.php then off course the contact form details are then sent to the correct email address, but all of the other params (such as senders email, message text etc) are still encoded
Does anybody know how to solve this? or have we missed something?
Thanks for your reply.
Yes we are using default UTF-8, in the following place:
Reading Settings > Encoding for pages and feeds: UTF-8
I’m not sure why the contact form converts the chars if you use UTF-8. Have you tried other contact form plugins like Contact Form 7 or cformsII – if they show the same error it’s very likely a hoster issue.
We are now using Contact Form 7 and this does not show the same problem, so we will use that for now
The site is: http://www.photographersseo.com
We are going to put up some more sites using this theme, and we would very much like to use the supplied contact form (ie the one we are having trouble with) so we would really like to get this problem resolved.
We have two sites up already and the problem shows on both of them, but contact 7 form works all OK. Would you be able to take a look at the sites to see if you can see what might be wrong please? I can let you have the address and login info
The topic ‘contact form params are being double url encoded, so email fails to send.’ is closed to new replies.