<p align="center"><strong>CFMAIL Example</strong></p>
<cfif IsDefined("Form.submit")>
<CFMAIL FROM="tx-web@ncsu.edu" TO="#Form.to#"
SUBJECT="#Form.subject#" type="html">
<html>
This is a sample message from Web Services at
NCSU College of Textiles.<br>
This email was generated
from an <a href=
http://www.tx.ncsu.edu/it/code_examples/cfmail.cfm>
example
page</a> on the CFMAIL tag.<br>
If you recieved this email without your knowledge, please email the
<a href="mailto:tx-web@ncsu.edu">sender</a>.
</html>
</cfmail>
An email has been sent to: <cfoutput>#Form.to#</cfoutput>.<br>
Return to the <a href="../codesamples.html">Code Examples </a>Page.
<cfelse>
<p>Type your email address, a subject, and a note
in the fields below:</p>
<form name="form1" method="post" action="">
<table width="100%" border="0">
<tr>
<td width="19%" bgcolor="#CC0000"><strong><font
color="#FFFFFF">To:</font></strong></td>
<td width="81%">
<input name="to" type="text" id="to" size="30"></td>
</tr>
<tr>
<td bgcolor="#CC0000"><strong>
<font color="#FFFFFF">Subject:</font></strong></td>
<td><input name="subject" type="text" id="subject" size="50"></td>
</tr>
<tr>
<td bgcolor="#CC0000"><strong>
<font color="#FFFFFF">Note:</font></strong></td>
<td><textarea name="note" cols="50" id="note"></textarea></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name="Submit" value="Send
Message"></td>
</tr>
</table>
</form>
<p>NOTE: The From field is hard coded so this is not used to
fake an email.<br>
</p>
</cfif>
Return to the Code Examples Page.

