Connecting to external SMTP server from Web App

Nick Roberts 6 Reputation points
2021-04-05T18:06:41.59+00:00

I'm got an Azure Web App running and one of it's tasks is to send emails out in response to user requests.

It does this by connecting to our (external) WHM/cPanel-based mail server using an authenticated, secure connection on port 465.

The Web App is running node.js 12.x and I'm using the nodemailer library.

Up until 1st April 2021 this was running fine, now not. When I look at the logs, I can see the DNS lookup working fine, but the connection is never established:

DEBUG Sending mail using SMTP/6.4.11[client:6.4.11]
DEBUG [LFBZLRxTUro] Resolved xxx.xxx.com as x.x.x.x [cache miss]

The same code running on my local machine runs fine:

DEBUG Sending mail using SMTP/6.4.11[client:6.4.11]
DEBUG [6rjf9wZwHAY] Resolved xxx.xxx.com as x.x.x.x [cache miss]
INFO  [6rjf9wZwHAY] Secure connection established to x.x.x.x:465

Two questions:

  1. Is what I'm trying to do possible on Azure using the Web Apps service
  2. Why was this AOK before 1st April 2021, and now bust?
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,960 questions
{count} vote

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.