如何从c sharp中的独立类发送html模板作为电子邮件

如何从c sharp中的独立类发送html模板作为电子邮件

问题描述:

hi


i我使用html模板从stand alon类文件发送邮件。但它会显示一个

错误对象引用未设置为对象的实例.my错误代码是

StreamReader reader = new StreamReader(System.Web.HttpContext.Current.Server.MapPath(〜/ Flow2PayManagement / EmailTemplates / LowStock.htm));



如果有人知道确切的问题帮助我

hi
i am using html template while send a mail from stand alon class file .but it will display an
error object reference not set to an instance of object .my error code is
StreamReader reader = new StreamReader(System.Web.HttpContext.Current.Server.MapPath("~/Flow2PayManagement/EmailTemplates/LowStock.htm"));

if anyone one knows the exact problem help me