Using Google reCAPTCHA with NMS form mail

Avatar
  • Answered
I've tried to incorporate google's reCAPTCHA to the nms formmail but without any luck. The google directions are for Matt's script formmail. Anyone know how to correctly add the script to the nms form mail? Help much appreciated!
Avatar
RAC007
There is a downloadable version of nms FormMail 3.14c1 which incorporates reCAPTCHA processing. The download and instructions can be found at:
http://www.ramblingross.co.uk/2010/08/09/recaptcha-and-nms-formmail-part-i/
http://www.ramblingross.co.uk/2010/08/10/recaptcha-and-nms-formmail-part-ii/
It runs flawlessly on Linux servers at two other webhosts. On the inmotion server with debug enabled, I got a "close sendmail pipe failed" error. I was able to get rid of the error by commenting out two lines in the script at around line 539 (depending on the number of "%recipient_alias" lines you have.

sub endmail {
my ($self) = @_;
#
#$self->{Pipe}->close or die "close sendmail pipe failed, mailprog=[$self->{Mailprog}]";
delete $self->{Pipe};

Avatar
JacobIMH
Hello royerlabs, and thank you for your question. Unfortunately from the looking around I've done, it would appear that it's not going to be something you can do really easily with nms FormMail and Google reCAPTCHA integration. This is because the development of nms FormMail was last updated around 2004, so it didn't take things like CAPTCHA into consideration. There is a post on Google Groups about reCAPTCHA and nms FormMail.pl integration from 2008 that seems to have a good proposed solution. It mentions needing to install the reCaptcha Perl module, and you can use our guide on how to install a Perl module for steps on how to complete that on our servers. However from the looks of it all, it seems you might have a lot better luck trying to instead find some newer software that has reCAPTCHA support already built-in. Some examples would be how to install the WP-reCAPTCHA plugin for WordPress, or how to setup reCAPTCHA in Joomla. If you had any success getting it running properly, please let us know so we can share that information with others. If you're still having issues getting it working at all, also please let us know so we can attempt to find an alternative solution. - Jacob