I have the following code:
if (smtpException != null)
{
if (smtpException.InnerException.Message.Contains("net_io_connectionclosed"))
{
sendingFailedException = new EmailSendingFailedException(EmailsLocalization.EmailSendFailedWrongPortNumber, e);
}
if (smtpException.StatusCode == SmtpStatusCode.MustIssueStartTlsFirst ||
smtpException.Message.Contains("AUTH"))
{
...
}
}
When I rely on exception message in my code can I be sure that it is in English?