开发者

COLDFUSION :: looking for guideline to upload image and then send as e-mail attatchment

开发者 https://www.devze.com 2023-01-20 03:17 出处:网络
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 Serve

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">
0

精彩评论

暂无评论...
验证码 换一张
取 消