I want to use HTML template in Timer Job.
My timer job is to send email.
I have the list of email address for To: List but I cannot access HTML template from the server.
I cannot use
Server.MapPath("Somepath\\test.htm")
Because its not a Http Request but a SpJobDefinition.
So how to access the file from the Server ?
PS: just like we use for FileUpload Control :
FileUpload1.SaveAs(Server.MapPath("path" + fileName));
If your file is located in the 14 hive you can use
SPUtility.GetGenericSetupPath()
to get the path to your file:will return:
in a default SharePoint setup.