I have a form that can be used to uplocad pictur开发者_Python百科es, and after uploading the pictures will be sent as e-mail attatchemnt to website admin and then the images will be deleted from Server.
Any guide line?
Thanks in advance.
You can attach the file using the method Matt suggested, or you can use a cfmailparam tag to attach one or more files, whether they're on disk or not:
<cfmailparam file="MyFile.txt" content="#VariableWithContent#" disposition="attachment" />
If you want to attach one or more physical files on disk you can do this:
<cfmailparam file="c:\MyFile.txt" disposition="attachment" />
If you don't want to keep the file on disk after CF is done sending the email, you can add the remove attribute to the cfmailparam tag to have CF get rid of it after the email is sent:
<cfmailparam file="c:\MyFile.txt" disposition="attachment" remove="true />
HTH,
Dan
Attaching the file to the email is straight forward, and is achieved by using the mimeattach attribute within the cfmail tag, like so:
<cfmail to="toAddress"
from="fromAddress"
subject="subject"
type="text"
mimeattach="path of file to attach, e.g: C:/generated/businessProposal.pdf">
精彩评论