hulio has asked for the wisdom of the Perl Monks concerning the following question:

I'm currently trying to use FormMail as it is supposed to install easily, and modify easily. I understand that there are security risks using it, but I don't have to where-with-all to create a script myself. Currently I am able to modify the script to behave at its most basic level, however, following the examples I am trying to increase its' functionality, but to no avail. I continually receive a 500 Internal error when I try to change the %recipient_alias = ( line to send to 2 addresses. any suggestions would be greatly appreciated. Hulio

Replies are listed 'Best First'.
Re: Newbie Trying to use FormMail
by tachyon (Chancellor) on Nov 15, 2004 at 22:36 UTC

    I am not going to assist you to get Matt's original scripts working. Hopefully you will take this piece of advice -> Download the secure version of Formmail from The NMS part of Matt's site. There is a README. If you READIT you will find everything clearly documented. The user servicable parts are at the top of the script. Read the readme, and follow the instructions.

    If you have not programmed anything ever be aware that computers are fussy. THIS is not the same as This ie case matters. 'This' is OK but 'This is missing a closing quote. In general every ; , . => ( ) 'quote' is important so follow the examples exactly

    The CGI Help Guide will help you as well. It will tell you how to find the syntax error you have introduced through your edits.

    cheers

    tachyon

      Download the secure version of Formmail from The NMS part of Matt's site

      It's probably better if you advise people to download the nms programs from the nms site rather than Matt's. The versions on Matt's site have sometimes sometimes lagged behind the latest release. Matt tells me he's fixed that problem now, but it's probably best to get them directly from the source.

      --
      <http://www.dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

      Actually, I am using the FormMail from nms. all I am doing is adding the recipient hidden field in the form. Before i did that the output was successfully printed to the browser. When I upload the change, I now get the 500 error. In the pl file I have these settings: $postmaster @referers @allow_mail_to each include the domain/address that i have included in the form field, and : @recipients = (); I am not completely new to programming, but it is quite obviously not my forte. Thanks again. Hulio

        Have you followed any of the other advice? The advice that notes there is a README and you need to READIT; you can/should add fatalsToBrowser; read the error log; read CGI Help Guide? You will have a trivial syntax error. It will be documented in the error log. If you post exactly what you are trying to upload (just cut and paste to configuration section between <code> </code> tags) + the logged error or carefully read the README and do it exactly as described.....

        cheers

        tachyon

Re: Newbie Trying to use FormMail
by VSarkiss (Monsignor) on Nov 15, 2004 at 22:32 UTC

    There are better alternatives than FormMail that are easy to use and modify, but don't have nearly as many insecurities. Take a look at http://nms-cgi.sourceforge.net for an excellent set.

Re: Newbie Trying to use FormMail
by reneeb (Chaplain) on Nov 15, 2004 at 22:30 UTC
    Do you have
    use CGI::Carp qw(fatalsToBrowser);
    in the script?
    This prints an error message to the browser. Without any error message it is hard to say what goes wrong.

    An other way to get a better error message is to look in the error_log of the webserver!
Re: Newbie Trying to use FormMail
by ysth (Canon) on Nov 15, 2004 at 22:35 UTC
    Perhaps you could show what you are changing the line from and to?