NMS FormMail.pl "Error: Bad or Missing Recipient"

1.3k Views Asked by At

I'm trying to set up a simple form mailer script for my website, using NMS FormMail.pl. No matter what I do, it gives me an error saying:

Error: Bad or Missing Recipient

There was no recipient or an invalid recipient specified in the data sent to FormMail. Please make sure you have filled in the recipient form field with an e-mail address that has been configured in @recipients or @allow_mail_to. More information on filling in recipient/allow_mail_to form fields and variables can be found in the README file.

The thing is, I've made sure countless times that the recipient field on the form is exactly the same as what I have in the @allow_mail_to part of the script. I've tried grabbing the latest version of the script, copy-pasting the email addresses from the form to the script and vice versa, putting \'s before the @ and . in the email and taking them out, and even taking out the recipient field on the form (when I do that it still gives me the error despite the Readme saying it would just send to whoever was first in the @allow_mail_to field).

Below is the config I have for the script as well as the form tags:

  BEGIN
{
  $DEBUGGING         = 1;
  $emulate_matts_code= 0;
  $secure            = 1;
  $allow_empty_ref   = 1;
  $max_recipients    = 1;
  $mailprog          = '/usr/sbin/sendmail -oi -t';
  $postmaster        = '';
  @referers          = qw(--.com);
  @allow_mail_to     = qw([email protected] --.com 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             = '/css/nms.css';
  $no_content        = 0;
  $double_spacing    = 1;
  $wrap_text         = 0;
  $wrap_style        = 1;
  $address_style     = 1;
  $send_confirmation_mail = 0;
  $confirmation_text = <<'END_OF_CONFIRMATION';
From: [email protected]
Subject: form submission

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 >>
# ----------------------------
# (no user serviceable parts beyond here)
}

The recipient form field:

<input name="recipient" type="hidden" id="recipient" value="[email protected]">

If it helps, I used Dreamweaver CS6 to create the site, including the form. I used Notepad to modify FormMail.pl. The server this is running on is Apache.

1

There are 1 best solutions below

0
On

I ended up using TFmail.pl by the same guys instead of FormMail.pl and that ended up working just fine.