SmtpClient发送163邮件被识别成垃圾邮件,求解决,急急急
以下是发送代码,
我把title和body 写成 11 234234 这能够受到,但是用在项目中做邮件提醒的时候就被识别成垃圾邮件了
titil="xxx项目发布,请查看详情"
body=“项目描述(省略n字,),<a href=‘xxxx’>点击查看</a>”
这样的发出去就被回退了 什么情况
public static bool SendEmailBy163(string toEmail, string emailTitle, string emailBody)
{
string fromEmail = "nxxxxxxxxxxxx@163.com";
string fromEmailPassWord = "pasword";
//设置发件人信箱,及显示名字
MailAddress from = new MailAddress(fromEmail, "PMS系统账户");
//设置收件人信箱,及显示名字
MailAddress to = new MailAddress(toEmail, "PMS");
//创建一个MailMessage对象
MailMessage oMail = new MailMessage(from, to);
oMail.Subject = emailTitle;
oMail.Body = emailBody;
oMail.IsBodyHtml = true; //指定邮件格式,支持HTML格式
oMail.BodyEncoding = System.Text.Encoding.GetEncoding("GB2312");//邮件采用的编码
oMail.Priority = MailPriority.High;//设置邮件的优先级为高
//发送邮件服务器
SmtpClient client = new SmtpClient();
client.Host = "smtp.163.com"; //指定邮件服务器
client.Credentials = new NetworkCredential(fromEmail, fromEmailPassWord);//指定服务器邮件,及密码
//发送
try
{
client.Send(oMail); //发送邮件
return true;
}
catch
{
return false;
}
finally
{
oMail.Dispose(); //释放资源
&nb