Fix for There was an error in the callback while sending mail from contact us form in blogengine

If you are using older version of BlogEngine then you may face this callback error while sending mail from contact us page. This issue is due to a change in URL of a Js file used in ReCaptcha control.

Finally Google have stopped serving the ReCaptcha Js file from its original path and moved the file to Google’s domain. This change in URL of ReCaptha Js causes the BlogEngine’s contact us form to fail. If you have not enabled ReCaptcha in your blog then you no need to worry about this issue.

Quick Fix

The immediate fix to resolve this issue is to disable Re-Captcha in your Blog Engine settings page. This would serve your contact us form without Re-Captcha validation and the form works without any issue.

Permanent Fix

This requires a code change. The URL for ReCaptcha Js is injected to the page via a server side Asp.Net control. In your Blog Engine code search for http://api.recaptcha.net/js/recaptcha_ajax.js

This URL will be referred in a function named “RenderContents” in a cs file named RecaptchaControl.cs . Change the above mentioned URL to http://www.google.com/recaptcha/api/js/recaptcha_ajax.js

Compile and deploy your dll . That’s it. Now the ReCaptcha will start working and the mail sending error will be gone.

Leave a comment