Reputation: 181
Hi I keep getting this error:
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Websites\site_sitecore\Website\Template\claim.htm'.
The code I'm using is:
message.BodyFileName = "/Template/claim.htm";
Basically trying to send an email template via email but I can't get it to find the path. If I use a external link with that file it denies access to it but can't work out how to get the correct path to work internally, any ideas?
Upvotes: 0
Views: 1932
Reputation: 3442
Use Server.MapPath('~/Template/claim.htm'). Does that work?
Upvotes: 1