http://www.cnblogs.com/shanyou/archive/2007/02/10/647096.html
http://blog.csdn.net/beyondjjw/archive/2008/08/05/2771370.aspx
用jmail的pop可以收,不过也有乱码的情况。
#region 邮件
/// <summary>
/// 发送邮件 - 无需插件支持10MB以内附件,附件太大情况下请使用多线程来完成
/// </summary>
/// <param name="sendEmailAccount">发件箱地址 如:mx3y@163.com</param>
/// <param name="sendEmailPassowrd">发件箱密码</param>
/// <param name="acceptEmailAccount">收件箱地址</param>
/// <param name="subject">邮件主题</param>
/// <param name="body">邮件正文内容</param>
/// <param name="attachments">附件 支持多附件,每个附件请传绝对路径,例如d:\temp.jpg</param>
public static void M_SendMail(string sendEmailAccount, string sendEmailPassowrd, string acceptEmailAccount, string subject, string body, string[] attachments)
{
try
{
SmtpClient client = new SmtpClient(string.Format("smtp.{0}", sendEmailAccount.Split('@')[1].ToString())); //设置邮件协议
client.UseDefaultCredentials = false;//这一句得写前面
client.DeliveryMethod = SmtpDeliveryMethod.Network; //通过网络发送到Smtp服务器
client.Credentials = new NetworkCredential(sendEmailAccount.Split('@')[0].ToString(), sendEmailPassowrd); //通过用户名和密码 认证
MailMessage mmsg = new MailMessage(new MailAddress(sendEmailAccount), new MailAddress(acceptEmailAccount)); //发件人和收件人的邮箱地址
mmsg.Subject = subject; //邮件主题
mmsg.SubjectEncoding = Encoding.UTF8; //主题编码
mmsg.Body = body; //邮件正文
mmsg.BodyEncoding = Encoding.UTF8; //正文编码
mmsg.IsBodyHtml = true; //设置为HTML格式
mmsg.Priority = MailPriority.High; //优先级
foreach (String attachment in attachments)
{
mmsg.Attachments.Add(new Attachment(attachment));// 发送附件
}
client.Send(mmsg);
}
catch
{
throw new Exception();
}
}
#endregion
绝对比他们的好
发Email给我,我这有已经完成的源码。
88223100@qq.com