How to Troubleshoot SMTP Email on Azure Windows Server VM
Question details
The user is unable to send outbound SMTP emails from a Windows Server 2022 virtual machine hosted on Microsoft Azure, despite using valid credentials.

- Product
- Azure Virtual Machines
- Device & OS
- Windows Server 2022
- Scenario
- Setting up or sending outbound emails via SMTP from an Azure-hosted virtual environment.
- Observed behavior
- SMTP email transmission fails completely across multiple ports due to potential network security rules or outbound traffic restrictions enforced by Azure.
Verify your SMTP server credentials and check if your specific Azure subscription type includes default restrictions on outbound port 25.
Check Azure Network Security Group (NSG) and Port Restrictions
Identify and resolve outbound port blocks (such as Port 25) that Microsoft Azure applies by default to prevent spam.
Microsoft Azure actively blocks outbound SMTP connections on port 25 by default for most subscription types. To successfully send emails, you must ensure your Network Security Group allows outbound traffic on your chosen SMTP port, or switch to an authenticated port like 587.
Log in to the Azure Portal, navigate to 'Virtual Machines', and select your Windows Server 2022 VM.
Click on 'Networking' in the left-hand menu and review your Outbound port rules in the Network Security Group (NSG).
If you are trying to use port 25, reconfigure your mail service to use port 587 (SMTP Submission) or 465, which are generally unblocked.
If the issue persists despite correct configurations, post your specific network topology in the official Azure Virtual Machines forum for expert review.

Reconfigure Email Client to Use Port 587
Bypass default network blocks by using secure, alternative SMTP ports for email transmission within your Windows Server.
Looking for a Lightweight Alternative for Your Office Needs?
While troubleshooting Azure infrastructure, you may also be seeking a reliable, cost-effective suite for daily document and email management. WPS Office provides a highly compatible, lightweight, and free alternative to Microsoft Office, complete with an integrated mail client.
- 1. Download the Installer: Visit the official WPS Office website and click the Free Download button.
- 2. Install WPS Office: Run the lightweight installation file on your local machine or virtual desktop.
- 3. Start Managing Documents: Open WPS Office to seamlessly manage your files, spreadsheets, presentations, and emails.

Frequently Asked Questions
Why is port 25 blocked on my Azure VM?
Microsoft Azure blocks outbound port 25 by default on most new subscriptions to prevent spam, protect the reputation of Azure IP addresses, and avoid abuse originating from their data centers.
Can I request Microsoft to unblock port 25 on my Azure VM?
Yes, but only for certain subscription types, such as Enterprise Agreements. If eligible, you can open a technical support ticket in the Azure Portal to request the removal of the port 25 restriction.
What is the recommended way to send email from an Azure environment?
The recommended approach is to use authenticated SMTP relay services, such as Microsoft 365, SendGrid, or Mailgun. These services typically operate securely over port 587, which is not blocked by Azure.




