Azure VM can't send emails to smarthost

Jukka Holmen 21 Reputation points
2020-09-17T12:37:27.14+00:00

Hello,

I am trying to send email from web application using Windows Server 2016 SMTP to my own private SMTP server using it as a smarthost, but nothing comes through.

I am aware that azure blocks SMTP traffic from port 25, so is this the case, and I should use relay, for example SendGrid to send it to my smarthost which sends it to the client?

Thank you very much.

Jukka Holmen

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,033 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shashi Shailaj 7,631 Reputation points Microsoft Employee Moderator
    2020-09-17T19:47:50.437+00:00

    Hello @Jukka Holmen ,

    Azure VM blocks outgoing port 25 connections on public IPs in order to avoid our public IPs getting misused and getting blacklisted by Anti-spam solutions. Yes you are completely correct. We recommend to use services like Sendgrid for the same. Please check the recommended method of sending email from azure VMs. In case you are getting any issue with inbound port 25 on Azure VM with public IP , please check the firewall services on the VM (windows/linux) along with allowing the same on NSGs. If not then you can contact Microsoft support for helping you troubleshoot the same. I understand you are tying to send outgoing traffic from the VM however I just shared the related information as it may be helpful to other readers as well.

    Hope this clarifies your query. Please check the related article and I believe you will be able to find out the details on using the SMTP port on Azure VM. If the information provided in this post is helpful , please do accept this as answer so that the relevancy of this answer improves and its useful to others with similar query within the community .

    Thank you.

    1 person found this answer helpful.
    0 comments No comments

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.