Hey everyone, I need some advice on this situation.
I’m trying to figure out the most reliable approach for handling email delivery from our system.
We’re running a service on an Azure virtual machine that sends out automated emails every day. Until now, we’ve used Direct Send to connect straight to our Office 365 SMTP server through port 25. We set up an IP-based connector in Exchange Online to make this work.
The challenge is that we’re migrating our application to a different Azure tenant soon. In this new environment, outbound traffic on port 25 is blocked. While we could get this restriction removed in our old tenant by submitting a request, it doesn’t seem like that’s going to be an option with the new one.
I looked into switching to port 587 as an alternative since Azure doesn’t block that port. However, this approach needs SMTP authentication, which we’ve turned off in Office 365 following security best practices.
My current thinking is that we might need to go with a third-party email service like Sendgrid or Mailgun to have a solution that meets security standards. But I wanted to ask here first to see if I’m missing any obvious alternatives.
Appreciate any input!
Azure Communication Services Email is worth checking out before going third-party. I used it last year for a similar migration and it plays nice with other Azure resources. Setup’s easy through the portal, and you get monitoring and logging that works with Application Insights. Authentication uses managed identities, so no more worrying about SMTP credentials. Pricing’s competitive with SendGrid and you don’t have to deal with another vendor. You’ll need to set up domain verification, but the docs are pretty clear on how to do it. Performance has been solid - good delivery rates for transactional emails.
Went through this same thing 6 months ago when we switched Azure subscriptions. We used Azure Logic Apps with the Office 365 Outlook connector and it worked great. You can stick with your current Office 365 setup - no need to mess with SMTP auth or port issues. Logic Apps handles authentication through service principals, and your app just sends HTTP requests to trigger emails. Costs us about $15/month for 2000 emails. Only downside is you’ll need to swap your SMTP code for REST calls, but that’s maybe two days of work. Delivery’s been rock solid and the retry logic is built right in.
Honestly, I’d go with SendGrid. I’ve used it for 3 years across multiple Azure deployments without any issues. Integration’s straightforward, and the free tier gives you 100 emails daily - probably enough for testing. Plus you’re not locked into Azure’s ecosystem if you switch cloud providers later.
This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.