Hi James,
One method to send emails from your app would be to use Azure Communication Services (ACS). Which port you need depends on the specific technique you use to send the messages.
For example, you could use the REST api to send the messages to ACS, in which case you would use port 443. OR, you could use SMTP to send to ACS, and in that case you would use port 587.
Below article shows you how to set things up to use SMTP (via secure port 587) to send emails to ACS:
Quickstart: How to create authentication credentials for sending emails using SMTP
Article below walks through using client SDKs, portal, CLI, which under the covers use REST API. Unfortunately I don't see php client:
Quickstart: How to send an email using Azure Communication Services
https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/send-email
Below article documents REST API so that you can send email that way:
Email - Send
In addition to the above you always could use one of the many third party services that allow you to send emails through them, such as Twilio SendGrid, SMTP2GO, etc.
Please click Accept Answer and upvote if the above was helpful. If something is unclear and/or you have a specific question on how to send via one of the above methods, add a comment.
Thanks.
-TP