Hi @Alexandru Paraschiv , I understand that you have an issue sending an email with app on Azure VM.
The Azure platform blocks outbound SMTP connections on TCP port 25 for deployed VMs. This block is to ensure better security for Microsoft partners and customers, protect Microsoft's Azure platform, and conform to industry standards.
We recommend you use authenticated SMTP relay services to send email from Azure VMs. Connections to authenticated SMTP relay services are typically on TCP port 587 which is not blocked. These services are used in part to maintain IP reputation which is critical for delivery reliability.
More info: Troubleshoot outbound SMTP connectivity problems in Azure
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.