设为首页 加入收藏

TOP

C# 邮件发送方法【webMail方式】(二)
2014-11-24 14:34:33 来源: 作者: 【 】 浏览:2
Tags:邮件 发送 方法 webMail 方式
yEncoding = System.Text.Encoding.UTF8;
System.Web.Mail.SmtpMail.SmtpServer = strSMTPServer;

System.Web.Mail.SmtpMail.Send(message);
}
}

bState = true;
}
catch (Exception ex)
{
System.IO.File.AppendAllText("C:\\Mail_Log.ini", string.Format("{0:yyyy/MM/dd HH:mm:ss}\r\n{1}\r\n\r\n", DateTime.Now, ex.Message));
bState = false;
strErrorMsg = ex.Message;
}

return bState;
}


//测试发送邮件


}


邮件在webconfig文件中配置如下:



首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇C#中 Process的扩展类ProcessExte.. 下一篇C# 邮件发送方法【NetMail方式】

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: