Send & Receive Issues

How to Troubleshoot SMTP Email on Azure Windows Server VM

Nimra MalikNimra Malik Oct 26, 2026 868 views

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.

How to Troubleshoot SMTP Email on Azure Windows Server VMs
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.
Before you start

Verify your SMTP server credentials and check if your specific Azure subscription type includes default restrictions on outbound port 25.

Solution 1Recommended

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.

1
Access Virtual Machine Settings

Log in to the Azure Portal, navigate to 'Virtual Machines', and select your Windows Server 2022 VM.

2
Review Networking Rules

Click on 'Networking' in the left-hand menu and review your Outbound port rules in the Network Security Group (NSG).

3
Use an Alternative Port

If you are trying to use port 25, reconfigure your mail service to use port 587 (SMTP Submission) or 465, which are generally unblocked.

4
Consult Azure Specialists

If the issue persists despite correct configurations, post your specific network topology in the official Azure Virtual Machines forum for expert review.

Check Azure Network Security Group (NSG) and Port Restrictions
Azure Default Restrictions: For standard Pay-As-You-Go subscriptions, port 25 is permanently blocked. You must use an authenticated SMTP relay service (like SendGrid or Mailgun) over port 587.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and click the Free Download button.
  2. 2. Install WPS Office: Run the lightweight installation file on your local machine or virtual desktop.
  3. 3. Start Managing Documents: Open WPS Office to seamlessly manage your files, spreadsheets, presentations, and emails.
Highly compatible with Microsoft Word, Excel, and PowerPoint formats.Includes a built-in Mail client to easily manage multiple email accounts.Lightweight installation ideal for virtual machine environments and local desktops.Free to use with a familiar, user-friendly interface for seamless migration.
QA img-9

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.