【问题标题】:How to configure SMTP for webmail如何为 webmail 配置 SMTP
【发布时间】:2017-10-02 03:57:33
【问题描述】:

我已尝试为我的网络邮件设置 SMTP 配置。我使用了以下设置进行配置

Username:   xyz@mydomain.in
Password:   Use the email account’s password.
Incoming Server:    a2plcpnl0234.prod.iad2.secureserver.net
                    IMAP Port: 993
                    POP3 Port: 995
Outgoing Server:    a2plcpnl0234.prod.iad2.secureserver.net
                    SMTP Port: 465

当我尝试使用这些设置时,我收到超时错误/发送邮件失败。 下面是c#代码

  SmtpClient smtp = new SmtpClient();
  smtp.Host = "webmail.mydomain.in";
  smtp.UseDefaultCredentials = true;
  smtp.EnableSsl = true;
  System.Net.NetworkCredential credentials = new System.Net.NetworkCredential();
  credentials.UserName = "xyz@mydomain.in";
  credentials.Password = "mypasword";
  smtp.Credentials = credentials;
  smtp.Port = 465;

【问题讨论】:

    标签: c# smtpclient webmail


    【解决方案1】:

    如果超时是问题,那么添加

     SmtpClient smtp = new SmtpClient();
      smtp.Timeout = 1200000;
    

    基本上它会解决问题

    根据评论更新

    Please refer the link

    【讨论】:

    • 对于 gmail SMTP 它的工作没有超时。如果我使用上面的设置它会显示错误。我认为设置有问题。所以上面的配置有什么错误
    • @veenahosur 我在答案中添加了一个链接,请仔细阅读。但关键是调试并找出真正的问题
    猜你喜欢
    • 1970-01-01
    • 2015-05-19
    • 2019-06-25
    • 2019-12-09
    • 2020-03-11
    • 2012-02-13
    • 1970-01-01
    • 1970-01-01
    • 2018-01-25
    相关资源
    最近更新 更多