#1楼 回复 引用 查看
2007-06-10 00:19 by Student [未注册用户]public void Send(string from, string to, string subject, string body, string[] cc, string[] bcc)
{
// Create mail message
MailMessage message = new MailMessage(from, to, subject, body);
message.BodyEncoding = Encoding.GetEncoding(936);
if (cc != null && cc.Length > 0)
{
foreach (string ccAddress in cc)
{
message.CC.Add(new MailAddress(ccAddress));
}
}
if (bcc != null && bcc.Length > 0)
{
foreach (string bccAddress in bcc)
{
message.Bcc.Add(new MailAddress(bccAddress));
}
}
//能解释一下这段代码吗?
谢谢
{
// Create mail message
MailMessage message = new MailMessage(from, to, subject, body);
message.BodyEncoding = Encoding.GetEncoding(936);
if (cc != null && cc.Length > 0)
{
foreach (string ccAddress in cc)
{
message.CC.Add(new MailAddress(ccAddress));
}
}
if (bcc != null && bcc.Length > 0)
{
foreach (string bccAddress in bcc)
{
message.Bcc.Add(new MailAddress(bccAddress));
}
}
//能解释一下这段代码吗?
谢谢


使用System.Net.Mail通过gmail发送电子邮件





}
}
张善友
博客统计信息
热门文章
最新评论
友情链接