Hello **Nilesh Kanawade
**It looks like you're running into some issues with outbound SMTP connections on Port 25, leading to those Connection Timed Out errors.
Port 25 Blockage: By default, Azure blocks outbound SMTP connections on TCP port 25 for most subscription types. This is mainly for security reasons and to conform to industry standards.
If you require access to SMTP port 25, you'll need an enterprise subscription. This port is not blocked for Enterprise Agreement (EA) or Microsoft Customer Agreement for Enterprise (MCA-E) subscriptions, though external domains may still be filtered.
- Go to the Virtual Network resource linked to your VM (prm-staging).
- Open the "Diagnose and Solve Problems" section.
- Select “Cannot send email (SMTP-Port 25)”.
- Once the block is removed, you'll need to stop and restart your virtual machine to apply the new network policy.
Although enabling port 25 is an option, it's generally better to use authenticated SMTP relay services for improved reliability and IP reputation. Services such as SendGrid or Azure Communication Services are recommended and usually operate over TCP port 587, which is already open for connections.
Check the below reference documents for more understanding:
Hope the above answer helps! Please let us know do you have any further queries.
Please do not forget to "accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.