Hi,
Based on my knowledge, looks like issue is with TLS 1.1. Can you please change it to TLS 1.2 in your application and check?
Did you test the IMAP connectivity with SSL/TLS connection type parameter?
Check if the certificate has been assigned with IMAP service. If using wildcard, then update the X509CertificateName in IMAP settings
Set-IMAPsettings –X509CertificateName ""
https://www.azure365pro.com/how-to-enable-and-configure-pop-imap-in-exchange-2013/
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
If the above suggestion helps, please click on "Accept Answer" and upvote it