急急急急急急!c#发邮件问题 我用c#做了一个发邮件的程序,账号是163的能接收成功,qq的直接就到垃圾箱了,其他的账号还收不到,这是怎么回事啊?请高手们帮忙啊,我是菜鸟!急急急急急急! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 jmail的代码怎么写啊?我用的是smtp,出现了以上问题! 7楼的前辈那能告诉我别的邮箱账号例如:sina,yahoo,hotmail等的账号发布出去是什么原因吗?谢谢! using System;using System.Web;using System.Net.Mail;public class TestSendMail{ public static int Main() { System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage(); msg.To.Add("[email protected]"); msg.From = new MailAddress("[email protected]", "AlphaWu", System.Text.Encoding.UTF8); //上面3个参数分别是发件人地址(可以随便写),发件人姓名,编码 msg.Subject = "这是测试邮件";//邮件标题 msg.SubjectEncoding = System.Text.Encoding.UTF8;//邮件标题编码 msg.Body = "<html><head></head><body><table><tr><td>hello</td><td>Neal</td></tr></table></body></html>";//邮件内容 msg.BodyEncoding = System.Text.Encoding.UTF8;//邮件内容编码 msg.IsBodyHtml = true;//是否是HTML邮件 msg.Priority = MailPriority.High;//邮件优先级 SmtpClient client = new SmtpClient(); // client.UseDefaultCredentials = true; client.Credentials = new System.Net.NetworkCredential("gmail邮箱账号", "gmail邮箱密码"); client.Host = "smtp.gmail.com"; //client.EnableSsl = true; // client.Port = 587; try { client.Send(msg); //简单一点儿可以client.Send(msg); Console.WriteLine("fasongchengong"); } catch (System.Net.Mail.SmtpException ex) { Console.WriteLine(ex.Message); } return 0; } }别叫我前辈,我也是小白,还没毕业呢 richTextBox中选中的字体显示红色遇到问题 为什么类里面的有些方法不能调用 google map v2怎么转化的v3? winform程序就只能放在一个文件夹吗? VS2005中引用自定义控件 如何模拟摩尔斯电码? XML读写的问题 这是什么控件 认为自己是C#高手,又愿意帮助别人的,Please come in 请看下,这个计时器与死循环 关于参数的问题 索引超出范围。必须为非负值并小于集合大小。(昨天还是正常的……)
using System.Web;
using System.Net.Mail;
public class TestSendMail{
public static int Main()
{ System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
msg.To.Add("[email protected]");
msg.From = new MailAddress("[email protected]", "AlphaWu", System.Text.Encoding.UTF8);
//上面3个参数分别是发件人地址(可以随便写),发件人姓名,编码
msg.Subject = "这是测试邮件";//邮件标题
msg.SubjectEncoding = System.Text.Encoding.UTF8;//邮件标题编码
msg.Body = "<html><head></head><body><table><tr><td>hello</td><td>Neal</td></tr></table></body></html>";//邮件内容
msg.BodyEncoding = System.Text.Encoding.UTF8;//邮件内容编码
msg.IsBodyHtml = true;//是否是HTML邮件
msg.Priority = MailPriority.High;//邮件优先级
SmtpClient client = new SmtpClient();
// client.UseDefaultCredentials = true;
client.Credentials = new System.Net.NetworkCredential("gmail邮箱账号", "gmail邮箱密码");
client.Host = "smtp.gmail.com";
//client.EnableSsl = true;
// client.Port = 587;
try
{
client.Send(msg);
//简单一点儿可以client.Send(msg);
Console.WriteLine("fasongchengong");
}
catch (System.Net.Mail.SmtpException ex)
{
Console.WriteLine(ex.Message);
}
return 0;
}
}
别叫我前辈,我也是小白,还没毕业呢