I am trying to get CFFILE variables from a form page passed
to the MIMEATTACH attribute of CFMAIL.
My form page looks like this:
<!--- List owner submits mail & image attachment to list --->
<FORM ACTION="mail.cfm" METHOD=POST ENCTYPE="multipart/form-data">
Subject: <INPUT NAME="Subject" SIZE="48">
<TEXTAREA NAME="Body" ROWS=10 COLS=60>
File Name: <INPUT NAME="FileName" TYPE="text" size="10">
File: <INPUT NAME="FileContents" TYPE="file" size="10">
<INPUT TYPE="Submit" VALUE=" Submit Message ">
</FORM>
My action page looks like this:
<CFIF #ParameterExists(FileContents)# is "Yes">
<CFFILE ACTION="UPLOAD"
FILEFIELD="FileContents"
DESTINATION="d:\home\goldenfly.com\maillist\uploads\"
NAMECONFLICT="OVERWRITE"
ACCEPT="image/jpeg, image/pjpeg, image/jpg, image/gif">
<CFSET
NewsletterFile="d:\home\goldenfly.com\maillist\uploads\<CFOUTPUT>#File.Serve
rFile#</CFOUTPUT>
</CFSET>
<CFQUERY NAME="GetList" DATASOURCE="GFMaillist1">
SELECT * FROM Subscribers
</CFQUERY>
<CFMAIL QUERY="GetList" SERVER="server name" PORT="25" TO="#Email#"
FROM="list owner"
MIMEATTACH="#NewsletterFile#" SUBJECT="#Form.Subject#" >
Date: #DateFormat(Now(),'dddd, mmm dd, yyyy')#
#FORM.Body#
</CFMAIL>
</CFIF>
I am not sure how to get the CFFILE "FileContents" variable passed to the
MIMEATTACH - I'm getting
an error in resolving the parameter "NewsletterFile". Any help please?
thanks,
Kristin
[EMAIL PROTECTED]
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.