Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfmail to="me@mydomain.com" from="you@yourdomain.com" subject="Subject" type="html">
- <cfmailparam file="http://myfilelocation/pdfFile.pdf">
- Body of the email
- </cfmail>
- <cfmail to="me@mydomain.com" from="you@yourdomain.com" subject="Subject" type="html">
- <cfmailparam file="d:websitesmysiteresourcespdf1.pdf">
- Body of the email
- </cfmail>
- <cfset tempFile = getTempDirectory(getTempFile()) />
- <cfhttp url="http://myfilelocation/pdfFile.pdf" method="get" file="#tempFile#"></cfhttp>
- <cfmail to="me@mydomain.com" from="you@yourdomain.com" subject="Subject" type="html">
- <cfmailparam file="#tempFile#">
- Body of the email
- </cfmail>
- <cfhttp method="get" url="http://myfilelocation/pdfFile.pdf">
- <!---conversion--->
- <cfif IsSimpleValue(cfhttp.Filecontent)>
- <cfset content = cfhttp.Filecontent>
- <cfelse>
- <cfset content = cfhttp.Filecontent.toByteArray()>
- </cfif>
- <cfmailparam file="#fileNameOfYourChoice#" type="#cfhttp.Mimetype#" content="#content#" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement