C# 发送邮件的问题 ~~~ 求助阿 !!!急!! 使用C#编写了一个发送邮件的程序向其他的邮箱里发送邮件都没有问题但是向新浪邮箱里发送邮件的时候 邮件里就会有用来定义格式的HTML代码 求大神帮助 !!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 新浪免费邮箱收信(pop3)服务器:pop3.sina.com.cn 新浪免费邮箱发信(smtp)服务器:smtp.sina.com.cn 新浪酷邮100邮箱收信(pop3)服务器:pop3.sina100.com 新浪酷邮100邮箱发信(smtp)服务器:smtp.sina100.com 新浪收费邮箱收信(pop3)服务器:pop3.vip.sina.com 新浪收费邮箱发信(smtp)服务器:smtp.vip.sina.com 新浪邮箱需要"smtp服务器要求身份验证选项"!!! 新浪免费邮箱发信(smtp)服务器:smtp.sina.com.cn public bool SendEmail(MailAddress From,MailAddress To,string subject,string body) { try { MailMessage message = new MailMessage(From, To); message.Subject = subject; message.Body = body; SmtpClient client = new SmtpClient(smtpServer, Convert.ToInt32(smtpPort)); client.Credentials = CredentialCache.DefaultNetworkCredentials; client.Host = smtpServer; client.Port = Convert.ToInt32(smtpPort); client.Send(message); return true; }static void Main(string[] args) { Email email = new Email(); string accountName = email.getConfig("accountName"); string smtpServer = email.getConfig("smtpServer"); string smtpPort = email.getConfig("smtpPort"); email.AccountName = accountName; email.SmtpServer = smtpServer; email.SmtpPort = smtpPort; MailAddress From = new MailAddress("[email protected]", "Test"); MailAddress To = new MailAddress("[email protected]", "Test"); if (email.SendEmail(From, To, "Test", "Hello World!")) { Console.WriteLine("|------------------------------OK---------------------------|"); } Console.ReadLine(); } } 循环生成的Textbox的TextChanged事件只触发一次 计算器 如何得到datagridview中选中的行? 取消已经存在的排序列? 复选框提示信息,兄弟姐妹们帮帮忙? 如何使用.net部署中的启动条件 一问题请高手帮忙 c# unity 3D 监视面板(Inspector) 为什么不显示类和成员啊 是不是哪里错了,总觉得同步调用与异步调用实现的功能和多线程很像 请问哪里有c#的下载 继续请教udp组播的问题。。 有几个page页面,如何实现点击page1上的按钮调出page2?
新浪免费邮箱发信(smtp)服务器:smtp.sina.com.cn
新浪酷邮100邮箱收信(pop3)服务器:pop3.sina100.com
新浪酷邮100邮箱发信(smtp)服务器:smtp.sina100.com
新浪收费邮箱收信(pop3)服务器:pop3.vip.sina.com
新浪收费邮箱发信(smtp)服务器:smtp.vip.sina.com 新浪邮箱需要"smtp服务器要求身份验证选项"!!!
{
try
{
MailMessage message = new MailMessage(From, To);
message.Subject = subject;
message.Body = body;
SmtpClient client = new SmtpClient(smtpServer, Convert.ToInt32(smtpPort));
client.Credentials = CredentialCache.DefaultNetworkCredentials;
client.Host = smtpServer;
client.Port = Convert.ToInt32(smtpPort);
client.Send(message);
return true;
}static void Main(string[] args)
{
Email email = new Email();
string accountName = email.getConfig("accountName");
string smtpServer = email.getConfig("smtpServer");
string smtpPort = email.getConfig("smtpPort");
email.AccountName = accountName;
email.SmtpServer = smtpServer;
email.SmtpPort = smtpPort;
MailAddress From = new MailAddress("[email protected]", "Test");
MailAddress To = new MailAddress("[email protected]", "Test");
if (email.SendEmail(From, To, "Test", "Hello World!"))
{
Console.WriteLine("|------------------------------OK---------------------------|");
}
Console.ReadLine();
}
}