SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: FormMail

  1. #1
    SitePoint Member
    Join Date
    Apr 2010
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy

    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/formm...c1/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/formm....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

  3. #3
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    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.

  4. #4
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    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.

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  6. #6
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    I guess you could use the
    'use 5.8' pragma at the beginning...

  7. #7
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  8. #8
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    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...

  9. #9
    Extremists Beware! Rockrz's Avatar
    Join Date
    Mar 2001
    Location
    In God's Country!
    Posts
    1,317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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
    .

  10. #10
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    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.

  11. #11
    Extremists Beware! Rockrz's Avatar
    Join Date
    Mar 2001
    Location
    In God's Country!
    Posts
    1,317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, maybe there will be an updated version soon
    .


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •