简体   繁体   English

NMS FormMail.pl“错误:收件人错误或丢失”

[英]NMS FormMail.pl “Error: Bad or Missing Recipient”

I'm trying to set up a simple form mailer script for my website, using NMS FormMail.pl. 我正在尝试使用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. 发送到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. 请确保您在收件人表单字段中填写了在@recipients或@allow_mail_to中配置的电子邮件地址。 More information on filling in recipient/allow_mail_to form fields and variables can be found in the README file. 在README文件中可以找到有关填写receive / allow_mail_to表单字段和变量的更多信息。

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. 关键是,我已经取得了一定无数次窗体上收件人字段是完全一样的我有什么在脚本的@allow_mail_to一部分。 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). 在电子邮件中并取出它们,甚至取出表单上的收件人字段(尽管这样做我仍然会给我带来错误,尽管自述文件说它将只发送给@allow_mail_to字段中的第一位谁)。

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

The recipient form field: 收件人表格字段:

<input name="recipient" type="hidden" id="recipient" value="steven@--.com">

If it helps, I used Dreamweaver CS6 to create the site, including the form. 如果有帮助,我使用Dreamweaver CS6创建网站,包括表单。 I used Notepad to modify FormMail.pl. 我使用记事本修改FormMail.pl。 The server this is running on is Apache. 运行该服务器的服务器是Apache。

我最终是由同一个人而不是FormMail.pl使用TFmail.pl,并且最终工作得很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM