FormMail

Hello

I know using a formmail script is probably outdated, but I was just wondering what is best to use.

Matts FormMail or NMS FormMail

Most places seem to say that NMS is more secure, but the most recent version of Matt’s script seems to be 2009, whereas latest update to NMS was 2004.

Any thoughts?

Also if I have created a matt form mail with captcha how easy would it be to transfer all that into nms script and can captcha easily be added to nms script?

Thank you in advance for any advice

I’ve not installed 5.12 yet and I don’t use nms scripts either but I believe there
is or was a compatibility switch in 5.12 to help run ‘legacy’ code.

Some monks thought the code still seemed to have outdated practices, even though the copyright has been updated, and said they would still use the nms version.

Me, I’d look closely at the Perl version used in nms and compare that to your current Perl version. You won’t (shouldn’t) have 5.12 yet but it is in many ways not backwards compatible with older Perls.

Yes. I was hoping 5.8 would be considered “old” by what seems to be a new user (but who knows what she’s working with to begin with).

I’m already hitting gaps and lurches from 5.8 to 5.010 with “state” (which I like, is very cool, but very different!). Fun times.

Other than use I don’t know of anything for legacy code and 5.12…

perldoc -f use

shows :

A fatal error is produced if VERSION is greater than the version of the current Perl interpreter; Perl will not attempt to parse the rest of the file.

So if one states use 5.8; then one is forcing the use of 5.8 and releases with higher version numbers - both 5.10 and 5.12 would be admissable but 5.6 would not.

I guess you could use the
‘use 5.8’ pragma at the beginning…

Well, I too see an update date on Matt’s page stating “2009”. I’ll ask someone if his update is also better code. And, if you’re starting out new (no old Perl anywhere) I’d use whichever uses the newest version of Perl. Unicode is best supported in version 5.8 and above, for example.

Had a quick look at the source code for these two items and I think I would prefer the NMS script. It appears to cope with UTF-8
as well as iso-8859-* character sets - inlcuding HTML escaping and non-printable character stripping.

Also http://www.scriptarchive.com/nms.html would appear to indicate that Matt hasn’t updated his scripts since 1996 while the nms
scripts are a little younger having been last updated in 2004.

I have no idea what platform you are on but ‘perldoc FormMail.pl’ under Linux gives the documentation for the nms FormMail.
I suggest you take a look.
You can get the nms FormMail.pl source code at http://nms-cgi.sourceforge.net/formmail_compat-3.14c1/FormMail.pl .
They are pretty clear about security holes in Matt’s scripts - no disprespect to Matt intended - and there are code examples at
http://nms-cgi.sourceforge.net/formmail_compat-3.14c1/EXAMPLES .

You build the HTML page with the mail form in it and the form action is FormMail.pl. If you are using server side checking of your captcha then
write a wrapper that does your captcha code check, instantiates the FormMail objects and methods as required and indicated in the examples.
If you are using a Javascript based captcha with no server side verification then you can build the HTML accordingly for that.

HTH

Lesley

Yes, maybe there will be an updated version soon

Browsers won’t care what formmail script you’ve got, but what I wonder is if something for dealing with (example) improved Unicode of 5.12 etc will come out? I’ll try to ask around.

Isn’t there going to be a perl formmail update someday soon on SourceForge.net?

Seems like this would be something that is needed so make formmail updated for the newer browsers