title: NMS FormMail.pl "Error: Bad or Missing Recipient"
body: <p>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:</p>
  
  <blockquote>
    <p><strong>Error: Bad or Missing Recipient</strong></p>
    
    <p>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.</p>
  </blockquote>
  
  <p>The thing is, I've made sure countless times that the recipient field on the form is <em>exactly</em> 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).</p>
  
  <p>Below is the config I have for the script as well as the form tags:</p>
  
  <pre><code>  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(steven@--.com --.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 = &lt;&lt;'END_OF_CONFIRMATION';
  From: you@your.com
  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 &lt;&lt; END &gt;&gt;
  # ----------------------------
  # (no user serviceable parts beyond here)
  }
  </code></pre>
  
  <p>The recipient form field:</p>
  
  <pre><code>&lt;input name="recipient" type="hidden" id="recipient" value="steven@--.com"&gt;
  </code></pre>
  
  <p>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.</p>