试图<cfmail>
从联系我们的静态页面发送。它将只有一个收件人,我不想将其保存在后端。
<cfcase value="contact">
<cfset caller.mainTitle = "Contact Us">
<div id="contact_form">
<cfform method="post" action="contact2" id="usrform">
First Name<br>
<input class="textbox" type="text" name="firstName" value="First Name" onfocus="if (this.value=='First Name') this.value='';">
<br>
Last Name<br>
<input class="textbox" type="text" name="lastName" value="Last Name" onfocus="if(this.value=='Last Name') this.value ='';">
<br>
Email<br>
<input class="textbox" type="text" name="email" value="Email" onfocus="if(this.value=='Email') this.value='';">
<br>
Phone Number<br>
<input class="textbox" type="text" name="phone" value="Phone Number" onfocus="if(this.value =='Phone Number') this.value='';">
<br>
<input type="submit" class='submitBtn'>
</cfform>
<br>
</div>
<div class="commentsTop">
<p style="color:black; font-size:18px; text-align:left;">We would love to hear from you!<p><br>
<textarea class="comments" rows="10" cols="100" name="comment" form="usrform" onfocus="if(this.value=='Enter your message here...') this.value='';">Enter your message here...</textarea>
</div>
</cfcase>
<cfcase value="contact2">
<cfmail to="test@test.com" from="tester@test.com" Subject="Message From Contact Us" type="HTML">
</cfmail>
</cfcase>
我有一个表格,我想作为电子邮件正文附加。不确定我是否需要将表格作为 a<cfform>
或者这无关紧要。