Hi EddieB,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
Azure blocks outbound traffic on port 25 by default. Since your application doesn’t support authentication, you can configure an SMTP relay server on your Azure VM as a workaround. Follow these steps:
- Deploy an SMTP relay server (e.g., hMailServer on Windows or Postfix on Linux) on the VM.
- Configure the relay to forward emails to Office 365 using SMTP AUTH on port 587.
- In Office 365, set up a connector to allow relay from the VM’s IP address.
Set up connectors for secure mail flow. - Update the VM’s NSG to allow outbound traffic on port 587 to Office 365.
For more details, please refer to the below documentation:
Troubleshoot outbound SMTP connectivity problems in Azure
If an answer has been helpful, please consider accept the answer and "Upvote" to help increase visibility of this question for other members of the Microsoft Q&A community.