关于发送EMAIL
我的Web程序调用这个函数
public bool Send(string SmtpServer, int Port, string UserName, string PassWord, string ADDRESS_FROM, string add_to, string title, string body)
{
DataSet ds = new DataSet();
SmtpClient mailClient = new SmtpClient(SmtpServer, Port);
mailClient.EnableSsl = true;
NetworkCredential crendetial = new NetworkCredential(UserName,PassWord);
mailClient.Credentials = crendetial;
MailMessage message = new MailMessage(ADDRESS_FROM, add_to, title, body);
message.BodyEncoding = System.Text.Encoding.UTF8;
message.IsBodyHtml = true;
message.SubjectEncoding = System.Text.Encoding.UTF8;
try
{
mailClient.Send(message);
return true;
}
catch
{
return false;
}
}
SmtpServer="stmp.163.com" Port=25
运行错误提示:服务器不支持安全连接 这是什么意思上啊?哪错了?还是什么东西没配置?
public bool Send(string SmtpServer, int Port, string UserName, string PassWord, string ADDRESS_FROM, string add_to, string title, string body)
{
DataSet ds = new DataSet();
SmtpClient mailClient = new SmtpClient(SmtpServer, Port);
mailClient.EnableSsl = true;
NetworkCredential crendetial = new NetworkCredential(UserName,PassWord);
mailClient.Credentials = crendetial;
MailMessage message = new MailMessage(ADDRESS_FROM, add_to, title, body);
message.BodyEncoding = System.Text.Encoding.UTF8;
message.IsBodyHtml = true;
message.SubjectEncoding = System.Text.Encoding.UTF8;
try
{
mailClient.Send(message);
return true;
}
catch
{
return false;
}
}
SmtpServer="stmp.163.com" Port=25
运行错误提示:服务器不支持安全连接 这是什么意思上啊?哪错了?还是什么东西没配置?
...全文
相关推荐
java发送email依赖jar包
java实现发送email验证码的jar包依赖 共有activation.jar、commons-email-1.4.jar、mail.jar
通过 Apache 的 Jarkata Common Email 来发送email
NULL 博文链接:https://filex.iteye.com/blog/569081
基于ESMTP的EMAIL的发送程序
基于ESMTP的EMAIL的发送程序。可以向指定的邮箱发送email
commons-email发送邮件
用 apache commons email 发送带附件,HTML 格式的 邮件 格式例子 还包括commons-email的jar包,及其他相关资料
发送email 发送email 发送email
发送email发送email发送email发送email发送email发送email发送email发送email发送email


