Kentico SMTP:使用TLS代替SSL

时间:2018-09-26 09:00:14

标签: ssl smtp kentico

我从提供商那里获得了如何连接到POP3 / SMTP服务器的配置设置。它可以在Outlook中完美运行,但不适用于Kentico(Azure托管)。

注意:在Gmail SMTP设置(启用SSL)的情况下,Kentico可以完美运行。

在Kentico中,我使用以下配置(如下),但是我无法调整协议(在我的情况下,TLS很重要)和端口号(587)。

  • smtp服务器-email.active24.com
  • 使用ssl-已选中
  • 登录-XXX@YYY.ZZZ
  • 密码-NNN

错误(如下所示)包含两条消息:

  • 消息:无法连接到远程服务器

  • 消息:由于目标计算机主动拒绝它,因此无法建立连接81.95.97.101:25


Message: Failure sending mail.

Exception type: System.Net.Mail.SmtpException
Stack trace: 
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at CMS.EmailEngine.EmailProvider.SendEmailInternal(String siteName, MailMessage message, SMTPServerInfo smtpServer)
at CMS.EmailEngine.EmailSender.SendTestEmail(String siteName, EmailMessage message, SMTPServerInfo smtpServer)
at CMSModules_System_System_Email.SendEmail() in C:\Projects\Kentico\_install\CMS\CMSModules\System\System_Email.aspx.cs:line 122
at CMSModules_System_System_Email.btnSend_Click(Object sender, EventArgs e) in C:\Projects\Kentico\_install\CMS\CMSModules\System\System_Email.aspx.cs:line 78

Message: Unable to connect to the remote server

Exception type: System.Net.WebException
Stack trace: 
at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
at System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
at System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint)
at System.Net.Mail.SmtpClient.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)

Message: No connection could be made because the target machine actively refused it 81.95.97.101:25

Exception type: System.Net.Sockets.SocketException
Stack trace: 
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)

我需要设置以下配置:

enter image description here

请建议我该怎么做。

1 个答案:

答案 0 :(得分:0)

正确的答案是将smtp服务器名称与端口号一起使用:

email.active24.com:587