SMTP outbound mail problem on port 587

Darryl Buckby 20 Reputation points
2025-04-22T17:31:57.1033333+00:00

I have a web app running as an App Service in Azure on Premium P2V3 instance.
SMTP mail is failing on port 587 with SSL enabled.

Mail was working until I upgraded the instance.

Mail from my other servers is working to this mail server with the same settings and identity.

The Mail service provider assures me that they are not blocking the list of outbound IP addresses I sent them and they are not throttling us and they are not seeing any failed connections.
The web app is a running on ASP.NET framework 4.8

Any suggestions on how I can track this problem down.

Thanks

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,770 questions
{count} votes

Accepted answer
  1. Laxman Reddy Revuri 4,405 Reputation points Microsoft External Staff Moderator
    2025-04-22T20:51:21.7666667+00:00

    Hi @Darryl Buckby
    It seems that you're encountering SMTP delivery problems on port 587 after upgrading your Azure App Service instance.

    1.Make sure your app's SMTP client is set to use StartTLS (EnableSsl = true), which is the correct method for port 587.
    2.Check your web app logs or Application Insights for any SMTP exceptions or timeout errors. This will help pinpoint where the failure occurs.
    3.Ensure your App Service instance can connect to the SMTP host on port 587.
    4.After upgrading, your App Service may now use different outbound IPs. Make sure these IPs are allowed by your SMTP provider.
    5.Use a tool like Telnet to test the connection to your SMTP server. You can do this by running telnet your.smtp.server 587 from a command line on a local machine or an Azure VM in the same virtual network to see if it connects.
    https://learn.microsoft.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity
    Please accept as "Yes" if the answer provided is useful , so that you can help others in the community looking for remediation for similar issues.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.