Hi Johnny,
On the companies public facing website, that is hosted externally to Office 365 we have contact forms etc.
The process when a person uses one of the forms is an email will be sent to them saying that they have requested information for example, and then an email will be sent to people internally (via a distribution group).
What I am having difficultly doing is connecting to the smtp server via the website, and gives me the error above.
When I have testing the website on my home computer on localhost for example the code all works fine and I get no errors and emails are sent; but when I publish the site I get errors and no emails are sent.
I am unsure if a certificate error with the hosting server for the website, or any other issues that I am struggling to find in my searches for an answer.
Many thanks.