我正在尝试构建一个表单,并且我正在使用在formmail(这是基本的formmail)中构建的提供程序,我被告知将其配置为接受图像作为formmail的一部分。当我运行不带Enctype标记的表单时,它可以正常工作,只是不发送图像。经过研究,我了解到您需要在表单上添加enctype =“ multipart / form-data”标记,它将允许图像与表单一起发送。添加enctype标记后,会出现此错误,但是我的收件人字段已填写,如果我不使用enctype标记,则可以正常工作,但是我无法发送文件。我还要注意,我无权访问我的提供商formmail.pl。
错误:错误/没有收件人 发送到FormMail的数据中没有指定收件人或指定了无效的收件人。请确保您在收件人表单字段中填写了@recipients中配置的电子邮件地址。有关填写收件人表单字段和变量的更多信息,请参见README文件。 FormMail V1.92©1995-2002 Matt Wright Matt's Script Archive,Inc.的免费产品。
下面是我的HTML。
<div class="container" id="indexbody">
<div class="row">
<div class="col">
<div class="content trophy">
<h3 class="h3-seo sechead">Ordering</h3>
<hr>
<form enctype="multipart/form-data" method="POST" action="http://hometeamsupply.com/cgi-bin/formmail">
<p>
<label style="margin-right: 100px">Name:
<input type="text" name="name" size=30 required>
</label>
<label>E-mail:
<input type="email" name="email_address" size=30 required>
</label>
</p>
<p>
<label>Catalog:</label>
<select name="catalog">
<optgroup label="Apparel & Accessories">
<option>Pennant Sportwear 2018</option>
<option>Alphaborder Apparel & Accessories</option>
<option>SanMar Apparel, Bags, & Caps</option>
</optgroup>
<optgroup label="Trophies, Awards & Engravables">
<option>Corporate Awards & Gifts</option>
<option>Sports Awards & Gifts</option>
<option>General Awards</option>
<option>Engravables & Gifts</option>
<option>Trophies & Accessories</option>
</optgroup>
<optgroup label="Workwear & School Jackets">
<option>GAME Workwear & School Jackets</option>
</optgroup>
<optgroup label="Uniforms and Teamwear">
<option>Badger Sports 2018</option>
<option>Augusta/Holloway/High-Five 2018</option>
<option>Alphaborder Team 365</option>
<option>Teamwork Athletic Apparel</option>
</optgroup>
</select>
</p>
<p>
<label>Order:</label><br>
<textarea name="order" placeholder="Enter Order Here" rows="4" cols="50" required></textarea>
</p>
<p>
<label>Logo Upload:</label><br>
<input type="file" name="image" accept="image/*">
</p>
<p><button>Submit</button> <button type="Reset">Reset</button></p>
<br>
<input TYPE="hidden" NAME="recipient" VALUE="donrobinson@hometeamsupply.com">
<input type="hidden" name="subject" value="HTS Online Order - E-Commerce">
<input type="hidden" name="title" value="HTS Online Order - E-Commerce">
<input type=hidden name="redirect" value="http://www.hometeamsupply.com/HTSthanks.htm">
<input type="hidden" name="return_link_url" value="http://www.hometeamsupply.com/HTSthanks.htm">
<input type="hidden" name="return_link_title" value="http://www.hometeamsupply.com/HTSthanks.htm">
<input TYPE="hidden" NAME="email" VALUE="postmaster@hometeamsupply.com">
<input type="hidden" name="background" value="">
<input type=hidden name="required" value="name,email,order">
<input type=hidden name="sort" value="order:="name,email,catalog,order,file">
<!--End private fields-->
<input TYPE="hidden" NAME="env_report" VALUE="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT"></p>
</form>
</div>
</div>
</div>
</div>