Today - after making no changes for years - an email function that uses Limilabs Mail library started failing with the error "Authenticate as SSL client failed. You might be connecting to non SSL port."
I am trying to connect to Amazon Web Services Simple Email Service using Port 587, which is their published port number for explicit SSL connections.
Here is my relevant code:
Dim MailServer As New Smtp()
Try
If IsNull(SMTPport, "") <> "" AndAlso IsNumeric(SMTPport) Then
Dim SmtpPortInteger As Integer = CInt(SMTPport)
MailServer.Connect(MailServerName, SmtpPortInteger)
Else
MailServer.Connect(MailServerName)
End If
If SMTPenableSSL = "Y" Then
MailServer.StartTLS()
End If
MailServer.UseBestLogin(SMTPuserID, SMTPpassword)
Catch ex As Exception
Event_DT.Dispose()
InitializationError("Error occurred while connecting to email server: " _
& ex.Message)
Exit Sub
End Try
I confirmed that SMTPport is set to "587" and SMTPenableSSL is set to "Y".
The code is hitting the catch block.
How can I get past this new error?