Hi All
I'm not a proficient coder, but have been trying to get a contact form integrated with reCAPTCHA, so far unsuccessfully.
I have checked and checked again the private and public site keys, and am sure they are corrrect.
Here's the domain:
www.thelondonbuntingcompany.co.uk/contact.htmlHere's teh webscript script:
local USERNAME = '
tom.t...@gmail.com'
local PASSWORD = '$$$$$$$$'
local SERVER = '
smtp.gmail.com'
local RECAPTCHAKEY = '$$$$$$$$'
local recaptcha = require 'recaptcha'
local markdown = require 'markdown'
if recaptcha.validate(RECAPTCHAKEY, request) then
html = markdown(request.form.body)
email.send {
server = SERVER, username = USERNAME, password = PASSWORD,
from = '
tom.t...@gmail.com', to = '
ly...@thelondonbuntingcompany.co.uk',
subject = '[contact form] '..request.form.subject,
text = request.form.body,
replyto = request.form.replyto,
html = html
}
return '<p>Sent the following mail:</p>'
..'<p>Subject: '..request.form.subject..'</p>'
..html,
{['Content-Type'] = 'text/html'}
else
return 'Failed CAPTCHA.'
end
No matter what I do, I get an error of Failed Captcha, and no email. error code is 200.
Any help or explanation of what I'm doing wrong - I would be very grateful :)
Tom