Lunarpages Web Hosting Forum

Author Topic: Help me with FoemMail.pl Please!!  (Read 4079 times)

Offline quomo

  • Trekkie
  • **
  • Posts: 16
Help me with FoemMail.pl Please!!
« on: March 16, 2005, 12:06:30 PM »

 :?
All I get is a 500 error when sending a form and no email is received.
I looked up for info in the forums but cant resolve it!
This is my code



#!/usr/bin/perl -wT
#
# NMS FormMail Version 3.14c1
#

use strict;
use vars qw(
  $DEBUGGING $emulate_matts_code $secure %more_config
  $allow_empty_ref $max_recipients $mailprog @referers
  @allow_mail_to @recipients %recipient_alias
  @valid_ENV $date_fmt $style $send_confirmation_mail
  $confirmation_text $locale $charset $no_content
  $double_spacing $wrap_text $wrap_style $postmaster
  $address_style
);

# PROGRAM INFORMATION
# -------------------
# FormMail.pl Version 3.14c1
#
# This program is licensed in the same way as Perl
# itself. You are free to choose between the GNU Public
# License <http://www.gnu.org/licenses/gpl.html>  or
# the Artistic License
# <http://www.perl.com/pub/a/language/misc/Artistic.html>
#
# For help on configuration or installation see the
# README file or the POD documentation at the end of
# this file.

# USER CONFIGURATION SECTION
# --------------------------
# Modify these to your own settings. You might have to
# contact your system administrator if you do not run
# your own web server. If the purpose of these
# parameters seems unclear, please see the README file.
#
BEGIN
{
  $DEBUGGING         = 1;
  $emulate_matts_code= 0;
  $secure            = 1;
  $allow_empty_ref   = 1;
  $max_recipients    = 5;
  $mailprog          = '/usr/sbin/sendmail -oi -t';
  $postmaster        = 'info@winmin.org';
  @referers          = qw(winmin.org localhost);
  @allow_mail_to     = qw(info@winmin.org localhost);
  @recipients        = ();
  %recipient_alias   = ();
  @valid_ENV         = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
  $locale            = '';
  $charset           = 'iso-8859-1';
  $date_fmt          = '%A, %B %d, %Y at %H:%M:%S';
  $style             = '';
  $no_content        = 0;
  $double_spacing    = 1;
  $wrap_text         = 0;
  $wrap_style        = 1;
  $address_style     = 0;
  $send_confirmation_mail = 0;
  $confirmation_text = <<'END_OF_CONFIRMATION';
From: info@winmin.org
Subject: E-mail Receipt

Thank you for your form submission.

END_OF_CONFIRMATION

# You may need to uncomment the line below and adjust the path.
* # use lib './lib';

# USER CUSTOMISATION SECTION
# --------------------------
# Place any custom code here

# USER CUSTOMISATION << END >>



my HTML is:

<form method="post" action="http://www.winmin.org/cgi-bin/intercorreo.pl" name="prayer" id="prayer">
     <input type=hidden name="redirect" value="http://www.winmin.org/thanks.php">
     <input type=hidden name="subject" value="Request Prayer">
     <input type="hidden" name="required" value="email">


ANY IDEAS ON WHAT IS WRONG??
Angel Luis Gonzalez
webmasters@quomo.org
www.quomo.org

Offline quomo

  • Trekkie
  • **
  • Posts: 16
Help me with FoemMail.pl Please!!
« Reply #1 on: March 16, 2005, 12:52:14 PM »
FYI I followed all steps in http://www.lunarforums.com/forum/viewtopic.php?t=18221

And changed to $style = '';  as I saw in some page in the forum.

ANY IDEAS? :cry:
Angel Luis Gonzalez
webmasters@quomo.org
www.quomo.org

Offline quomo

  • Trekkie
  • **
  • Posts: 16
Help me with FoemMail.pl Please!!
« Reply #2 on: March 16, 2005, 01:02:37 PM »
I changed intercorreo.pl to mailscript.pl in the HTML and also as the name of the script, and CHMD the file to 755.
Still, WONT WORK.

Is there a good soul with sum spare seconds? :poke:

The form is here:
http://www.winmin.org/request-prayer/index.php
Angel Luis Gonzalez
webmasters@quomo.org
www.quomo.org

leighsww

  • Guest
Help me with FoemMail.pl Please!!
« Reply #3 on: March 16, 2005, 01:30:25 PM »
Did you upload in ASCII?

Also, make sure that your script is intact and that no code is missing. Check the one on your server with the original one and make sure the end parts are exactly the same.

Many times the script gets truncated when uploading via cPanel, or gets corrupted via FTP if not uploaded in ASCII, thus the errors.

If you still are getting problems after doing the above, PM me your username/password and I will go in and check it for you to make it work.

leighsww

  • Guest
Help me with FoemMail.pl Please!!
« Reply #4 on: March 16, 2005, 01:33:42 PM »
One more thing, for your "action" in your html form, change to this:

Code: [Select]
<form method="post" action="cgi-bin/intercorreo.pl">

Use the relative URL instead of the absolute URL.

leighsww

  • Guest
Help me with FoemMail.pl Please!!
« Reply #5 on: March 16, 2005, 01:37:22 PM »
Oops, disregard my last post, because after your last post and looking at your source code, I now I see you changed that already.

Offline quomo

  • Trekkie
  • **
  • Posts: 16
Help me with FoemMail.pl Please!!
« Reply #6 on: March 16, 2005, 01:41:24 PM »
Nai, its not working.
I tried cgi-bin/mailscript.pl (intercorreo.pl renamed)
and /cgi-bin/mailscript.pl
and http://www.winmin.org/cgi-bin/mailscript.pl

what's next?
Angel Luis Gonzalez
webmasters@quomo.org
www.quomo.org

Offline quomo

  • Trekkie
  • **
  • Posts: 16
Help me with FoemMail.pl Please!!
« Reply #7 on: March 16, 2005, 01:46:26 PM »
My code again:

**************************************************
BEGIN
{
  $DEBUGGING         = 1;
  $emulate_matts_code= 0;
  $secure            = 1;
  $allow_empty_ref   = 1;
  $max_recipients    = 5;
  $mailprog          = '/usr/sbin/sendmail -oi -t';
  $postmaster        = 'info@winmin.org';
  @referers          = qw(winmin.org www.winmin.org localhost);
  @allow_mail_to     = qw(info@winmin.org localhost);
  @recipients        = ();
  %recipient_alias = (
                        '1' => 'info@winmin.org',
                        '2' => 'request@winmin.org',
                        '3' => 'intercessors@winmin.org',
                        '4' => 'donations@winmin.org',
                        '5' => 'orders@winmin.org',
                        '6' => 'registration@winmin.org',

                      );
  @valid_ENV         = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
  $locale            = '';
  $charset           = 'iso-8859-1';
  $date_fmt          = '%A, %B %d, %Y at %H:%M:%S';
  $style             = '/css/nms.css';
  $no_content        = 0;
  $double_spacing    = 1;
  $wrap_text         = 0;
  $wrap_style        = 1;
  $address_style     = 0;
  $send_confirmation_mail = 0;
  $confirmation_text = <<'END_OF_CONFIRMATION';
From: info@winmin.org
Subject: E-mail Receipt

Thank you for your form submission.

END_OF_CONFIRMATION
***************************************************

And the HTML:
--------------------------------------------------------------------------
<form method="post" action="http://www.winmin.org/cgi-bin/mailscript.pl">
     <input type="hidden" name="redirect" value="http://www.winmin.org/thanks.php">
     <input type="hidden" name="recipient" value="3" />
     <input type="hidden" name="subject" value="Request Prayer">
     <input type="hidden" name="required" value="email,request">
----------------------------------------------------------------------------

No idea what's wrong!
Angel Luis Gonzalez
webmasters@quomo.org
www.quomo.org

Offline quomo

  • Trekkie
  • **
  • Posts: 16
Help me with FoemMail.pl Please!!
« Reply #8 on: March 16, 2005, 01:49:57 PM »
Did all you requested, no changes.
will PM you
Angel Luis Gonzalez
webmasters@quomo.org
www.quomo.org

leighsww

  • Guest
Help me with FoemMail.pl Please!!
« Reply #9 on: March 16, 2005, 01:52:38 PM »
Okay, that's the best to save us both time  :thumb:

I'll post back here when I'm done.

leighsww

  • Guest
Help me with FoemMail.pl Please!!
« Reply #10 on: March 16, 2005, 02:29:35 PM »
Okay, got it! I basically replaced your script with mine and entered your info where appropriate (cuz I couldn't see where the problem was occuring in your script).

I sent you a test email.

I didn't touch your original files, so the working ones are called:

index2.php
mailscript2.pl


I removed the absolute URLs and made them relative URLs in your html form.

You basically can use them as is or rename then to your original filenames by removing the "2". However, if you do that, you also need to change the "action" to remove the "2" there, as well, so it points to just "mailscript.pl"

Test it out and if all is good, we'll consider you resolved:

http://www.winmin.org/request-prayer/index2.php

Offline quomo

  • Trekkie
  • **
  • Posts: 16
Help me with FoemMail.pl Please!!
« Reply #11 on: March 16, 2005, 02:49:25 PM »
I think its working quite well. I have no idea why wasnt working. The changes you made I thought I tried them already.

In any case, THANKS A MILLION!!!! And I hope you learnt something out of this!

You are the best!
Angel Luis Gonzalez
webmasters@quomo.org
www.quomo.org

leighsww

  • Guest
Help me with FoemMail.pl Please!!
« Reply #12 on: March 16, 2005, 02:52:57 PM »
Quote from: quomo
And I hope you learnt something out of this!

LOL!!  :o  :love:

Offline quomo

  • Trekkie
  • **
  • Posts: 16
Help me with FoemMail.pl Please!!
« Reply #13 on: March 16, 2005, 03:24:43 PM »
As a payback, a few smiles:

http://www.jibjab.com
Angel Luis Gonzalez
webmasters@quomo.org
www.quomo.org

leighsww

  • Guest
Help me with FoemMail.pl Please!!
« Reply #14 on: March 18, 2005, 12:04:34 PM »
quomo, I forgot to remove my email addy inside the script under the confirmation email section. Can you please remove it? You aren't using that return confirmation for your form, so it doesn't affect anything. I just don't want my email on there.

If you prefer me to remove it, let me know and I'll do so. If you changed the password to your server, I'll need it to get in again.