This error is displayed due to the fact that the self assigned certificate or that correct certificate is not assigned to the SMTP on your Exchange server.
In order to view what certificate are you getting from your Exchange server when you access your SMTP, please use the OpenSLL and the following command to download certificate:
s_client -showcerts -connect URL_for_your_mail_server:587 -starttls smtp
Should you have any further questions