Reputation: 882
I'm facing an issue to send mail from our Wordpress website, hosted on Azure.
I have a separate SMTP server which has had the firewall opened for access (port 25) from the IP address of the Wordpress app service. Network engineers are not seeing any traffic hitting the firewall from my IP address and believe that either WordPress or my Azure are blocking the traffic.
The mailer is SMTP Mailer - Version 1.1.4
On the WordPress "Test Email", I am getting the following error [IP address redacted]
Connection: opening to ip address:25, timeout=300, options=array ( 'ssl' => array ( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true, ),)
Connection failed. Error #2: stream_socket_client(): unable to connect to ip address:25 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) [C:\home\site\wwwroot\wp-includes\PHPMailer\SMTP.php line 389]
SMTP ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)
SMTP Error: Could not connect to SMTP host.
Upvotes: 0
Views: 855
Reputation: 590
As per documentation ,
Sending email on Port 25 is unsupported from all Azure Platform-as-a-Service (PaaS) resources, including Azure App Service and Azure Functions.
If you are trying this from a VM and if you are on an Enterprise Dev/Test subscription, port 25 is blocked by default. It is possible to have this block removed. To request to have the block removed, go to the Cannot send email (SMTP-Port 25) section of the Diagnose and Solve blade in the Azure Virtual Network resource in the Azure portal and run the diagnostic.
Upvotes: 0