Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FormMail help required~

    Im in desperate need of help, this script keeps throwing up a 500 error for me, and ive tried literally everything to get it working. Help would be much appreciated.

    The script is FormMail by Matt Wright



    http://www.paste.to/v/ral301ns <- the code

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,874
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Matt's script is not written very well. It would be best to replace it with the FormMail script from the NMS project, which is a drop-in replacement for Matt's script.

    Oops, I forgot to give you the link.
    http://nms-cgi.sourceforge.net/scripts.shtml
    Last edited by FishMonger; 06-25-2009 at 06:51 PM.

  • #3
    Banned
    Join Date
    Jul 2009
    Posts
    52
    Thanks
    10
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by Monkeyace View Post
    Im in desperate need of help, this script keeps throwing up a 500 error for me, and ive tried literally everything to get it working. Help would be much appreciated.

    The script is FormMail by Matt Wright



    http://www.paste.to/v/ral301ns <- the code
    But what's "everything"?

    - chmodding it properly

    - checking the file is saved in the correct format (i.e. the linebreaks/returns haven't been made inappropriate by saving it on one o.s. and then using it on a different one after ftping it - eg mac to pc, or anything and linux... it's a possibility)

    - being sure that anything you've added (specific fields) has been done correctly and you haven't accidentally removed a " or something


    I can't think of much else - what else did you do to try and solve the problem?

    Have you thought of trying to put it together yourself - sending mail from cgi is very easy - no one really needs a readymade script...

    here are some meccano parts for you -

    Code:
    $sendmailpath="/usr/sbin/sendmail";
    
    open (SENDMAIL, "| $sendmailpath -t");

    below there are also bits for sending attachments, but i didn't include the previous stuff for building up to it since you don't wanna get too confused too early

    Code:
    print SENDMAIL "Subject: $subject\n";
    print SENDMAIL "From: $from\n";
    print SENDMAIL "To: $to\n";
    #print SENDMAIL "Cc: $cc\n";
    print SENDMAIL "Bcc: $bcc\n";
    print SENDMAIL "Mime-Version: 1.0\n";
            print SENDMAIL "Content-Type: multipart/mixed; ";
            print SENDMAIL "boundary=\"$BOUNDARY\"\n";
            print SENDMAIL "\n\n";
            print SENDMAIL "--$BOUNDARY\n";
            print SENDMAIL "Content-Type: text/plain; charset=us-ascii\n";
            print SENDMAIL "\n";
            print SENDMAIL "$MSG\n$bmsg\n";
            print SENDMAIL "--$BOUNDARY\n";
            print SENDMAIL "Content-Type: $wotsit\n";
            print SENDMAIL "Content-Transfer-Encoding: base64\n";
            print SENDMAIL "\n";
    #        print SENDMAIL `$GZIP "$file"`;
            # BASE64 Encode it and include it in the message
    #       print SENDMAIL `$MMENCODE "$file"`;
    print SENDMAIL "$encodata";      
           print SENDMAIL "\n--$BOUNDARY--";

    Code:
    
    close (SENDMAIL);

  • #4
    Banned
    Join Date
    Jul 2009
    Posts
    52
    Thanks
    10
    Thanked 4 Times in 4 Posts
    I solved your problem, though:

    $ perl jobby
    Array found where operator expected at jobby line 47, at end of line
    syntax error at jobby line 47, near "name@domain"
    Execution of jobby aborted due to compilation errors.



    so let's have a peek...
    @recipients = &fill_recipients(name@domain.com);

    is where it is going wrong

    you need to solve that - i have no idea what any of it is doing anyway

    it's apparently some newfangled anti-spam system, very basic.

    who knows what you should be putting in there - but maybe the @ without any \ has something to do with it, or the lack of "s, who knows

    if you put name@domain.com in "s it does actually work...


    try it.
    but the backslash idea was no good. just me shooting rounds off in the dark.

    anyway there you go, i have solved it for you - put quotemarks around that email address (although perhaps changing it to your email first would be wise)


  •  

    Posting Permissions

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