Advertisement
Advertisement
| 08.26.2008 at 11:03PM PDT, ID: 23681027 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: |
<cfparam name="FORM.attachment_1" default="">
<cfparam name="FORM.subject" default="">
<cfparam name="FORM.message" default="">
<cfparam name="FORM.name" default="">
<!--- check for upload --->
<cfif FORM.attachment_1 neq "">
<!--- upload file --->
<cffile action="upload"
filefield="attachment_1"
destination="/web/wprop/web/forms/uploads/attach"
nameconflict="Makeunique">
<!--- temp folder on server --->
<cfset attachment_local_file_1 = "/web/wprop/web/forms/uploads/attach/#file.serverfile#">
</cfif>
<!--- email with attachments --->
<cfmail from="EMAIL ADDRESS" to="EMAIL ADDRESS" subject="#subject#">
#message# #name#
<cfsilent>
<!--- cfsilent (to kill whitespace) --->
<cfif FORM.attachment_1 neq "">
<cfmailparam file="#attachment_local_file_1#">
</cfif>
</cfsilent>
</cfmail>
<!--- <cffile action = "delete" file ="/web/wprop/web/forms/uploads/attach/#attachment_local_file_1#"> --->
<form action="mail_form.cfm" method="post" enctype="multipart/form-data">
<table width="500" border="0" align="center">
<tr>
<td width="500" colspan="2">Please enter your email message:</td>
</tr>
<tr>
<td width="250">Name:</td>
<td width="250"><input type="text" name="name" value=""></td>
</tr>
<tr>
<td width="250">Subject:</td>
<td width="250"><input type="text" name="subject" value=""></td>
</tr>
<tr>
<td width="250" valign="top">Message</td>
<td width="250"><textarea name="message" rows="5" cols="35"></textarea></td>
</tr>
<tr>
<td width="250">Attachment #1:</td>
<td width="250"><input type="file" name="attachment_1" value=""></td>
</tr>
<tr>
<td width="250"> </td>
<td width="250"><input type="submit" name="Send_ Email" value="Send Email"></td>
</tr>
</table>
</form>
|