My app enables users to send mails to their clients, using the smtp settings of the user. I am struggling to do this for years now, sometimes it works and now it doesn’t. Where do I get the SSL certificate, or does that mean, I have to provide for the user to enter their SSL certificate password?
Is it better, to share my own smtp settings to enable them to send e-mails - and again, where to I find my certificate?
Also, in the past - if it worked - I could get it running for “normal” ISP’s but not for iCloud… Tried to do it with the app specific password, but no good…
Please show your code. I recently added code in my app so that users can send themselves emails. I had to add a check to get the SSL version like this with the Chilkat plugin:
dim theSocket as new Chilkat.Socket
dim success as Boolean = theSocket.Connect(SMTPServer, Port, False, 1 * 1000)
if not success then
globals.theErrorLog.DialogErrorProceed(kErrorMailSent + " " + kError + " " + parseError(theSocket.LastErrorText))
Return False
end if
// Check the negotiated TLS version
Dim negotiatedTlsVersion As String = theSocket.AlpnProtocol
If negotiatedTlsVersion <> "h2" Then
mailman.UncommonOptions = "DisableTls13"
End If
call theSocket.Close(1 * 1000)
That should be fine. Have you checked the server responses with the Error and ServerError events? Sometimes you get messages telling you what the problem is.
When Microsoft was rolling out the feature where the rejected connections that weren’t secure enough, they were doing it at random so that some would send and some would not. The SSL negotiation was eventually fixed in Xojo 2022r2, however there is now a known issue with SendGrid.
Which mail services are failing is an important factor when debugging this kind of problem.