timonline
asked on
Trouble With CFMAILPARAM and FILE attribute
With <CFMAILPARAM> I can embed an image in an email when the File attribute is pointing to a local path, such as C:\wwwroot\abc\images\thei mage.gif. The ContentID, disposition and type attributes all seem OK. But when I try to do the same thing and refer to a system path on a remote server I get an Unknown Attribute error. It must have something to do with the path but I can't work out what the problem is. My best guess was File="http://www.domainname.com/images/theimage.gif" but that doesn't work. Anybody out there that can help?
ASKER
SidFishes, thankyou...
Can I confirm one thing...You can't access a web address such as http://www.domain.com/images/theimage.gif in order to grab an image and embed it into an email using <CFMAILPARAM>? If so, how could I achieve this? I simply want to embed an image into an email 'on the fly' when a visitor registers on my website.
Can I confirm one thing...You can't access a web address such as http://www.domain.com/images/theimage.gif in order to grab an image and embed it into an email using <CFMAILPARAM>? If so, how could I achieve this? I simply want to embed an image into an email 'on the fly' when a visitor registers on my website.
can you not just store the file locally?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
err
path="c:\temp\"
file="theimage.gif">
path="c:\temp\"
file="theimage.gif">
If so it is due to the cfservice not having permissions to that folder. By default CF runs as local system which does not have any access to network shares and drives.
You need to create a domain user called cfservice (or whatever), then on the machine which is running cf, go to admin tools > services right click/properties on cf App Server logon tab log on as cfservice and password ok restart service
go to net folder and assign read and write if desired (for cffile) permissions to cfservice
if you are trying to access a web address...you can't. You would need to use cfhttp to grab the image and then use that. cfmailparam needs an absolute path