【问题标题】:mailbee send mail smtp error c#mailbee发送邮件smtp错误c#
【发布时间】:2017-02-06 19:15:15
【问题描述】:

这个错误的原因是什么

MailBee.NET.4.dll 中发生了“MailBee.MailBeeSocketTimeoutException”类型的异常,但未在用户 cod 中处理 附加信息:套接字连接已超时。 InnerException 消息如下:连接尝试失败,因为连接方在一段时间后没有正确响应,或建立连接失败,因为连接的主机没有响应

编辑

string str ="";
MailBee.Global.LicenseKey = "";
Smtp mailer = new Smtp(); 
SmtpServer server = new SmtpServer("smtp.gmail.com", "", "");
server.SslMode = SslStartupMode.UseStartTls;
mailer.SmtpServers.Add(server);
mailer.BodyHtmlText = str;
mailer.From.Email = "info.likeland@gmail.com";
mailer.To.Add(email);             
mailer.Subject = "";
if (mailer.Send())
{
   return Json(new JsonData()
   {
      DntSuccess = true,
      DntHtml = ""
   });
}

它。无缘无故发生。 我该怎么办

【问题讨论】:

  • 你应该分享相应的代码。
  • 你现在可以看到

标签: c# email smtp


【解决方案1】:

您需要使用 mailer.Log 属性启用对文件的登录,然后重试并查看日志中的内容。这将向您显示组件尝试连接到哪个端口等。从那里,您将能够了解下一步该做什么(例如,在防火墙中打开一个端口,或者如果当前端口被阻止,则尝试另一个端口您的 ISP 级别)。

【讨论】:

    猜你喜欢
    • 2017-06-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-30
    • 1970-01-01
    • 2010-11-03
    • 2017-06-26
    • 2014-03-16
    相关资源
    最近更新 更多