I've got 2 IIS servers: "Local" IIS" that runs on my network and "Remote IIS" located on other network. Both IIS servers have exactly the same application installed used to send e-mails. An email used to send messages is from Exchange Online, Microsoft 365. Following the guide Configure Send Submission: I have configured "SMTP submission" for this email address, however, it only works from "Local IIS" and not from "Remote IIS", not sure why.
Remote IIS: Windows 2012R2, IIS 8
Local IIS, windows 10 Pro; IIS 10
There is nothing that blocks outgoing port 587 on "Remote IIS". For testing purposes my colleague created a simple app, that runs independently from IIS , that also sends email and it works fine using the same Exchange Online user. The problem seems to be on IIS server on that server. Any ideas why "Remote IIS" does't send email?
The error is:
ERROR: Code: GeneralFailure Trace: en System.Net.Mail.SmtpClient.Send(MailMessage message) en Forms_Login.btopepe_Click(Object sender, EventArgs e) Message: Error al enviar correo.