I have an app wrote for a client that emails notifications to me if an error occurs while it is running, it has been working fine using gmail as the mail server, but now I need to switch it to work with an exchange server. IT has setup SMTP as an option for me to use, but I am getting an error when I try to send an email.
The LastExceptionMessage I am getting is:
javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xa43d0908: Failure in SSL library, usually a protocol error
error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER (external/boringssl/src/ssl/tls_record.cc:242 0xa352b64b:0x00000000)
B4X:
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
smtpClient.Initialize("mail1.xxxxxx.com", 25, "xxxx@xxxxxx.com", "xxxxxxxxx", "SMTP")
Send_EMail("This is a test","WO App EMail test")
End If
End Sub
Sub Send_EMail(text As String,subject As String)
smtpClient.StartTLSMode = False
smtpClient.UseSSL = True
smtpClient.AuthMethod = smtpClient.AUTH_LOGIN
smtpClient.MailFrom = "WorkOrderSystem-NoReply@xxxxxxxx.com"
smtpClient.To.Add("xxxxxxxx@gmail.com")
smtpClient.Subject = Starter.EmpId & " " & subject
smtpClient.Body = text
smtpClient.Send
End Sub
Sub SMTP_MessageSent(Success As Boolean)
Log(Success)
If Success Then
ToastMessageShow("EMail sent successfully", True)
Else
ToastMessageShow("Error sending EMail", True)
Log(LastException.Message)
End If
The LastExceptionMessage I am getting is:
javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xa43d0908: Failure in SSL library, usually a protocol error
error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER (external/boringssl/src/ssl/tls_record.cc:242 0xa352b64b:0x00000000)