Hi! Would you have any pointers for using the email-sending functionality with emails managed via Office 365? It looks like Microsoft is not too happy to provide SMTP basic auth, I'm curious if you have some suggestions how to configure it properly
f
fast-lunch-54279
03/30/2023, 7:25 AM
have you tried STARTTLS? IIUC Office 365 should support that?
c
curved-wolf-66275
03/30/2023, 9:11 AM
You might want to look into a completely different solution for sending emails.
SMTP Auth still works with Microsoft 365. But as you said they do not seem to be too happy to provide that functionality at all. (see
https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online )
There are also some limits, e.g. 100,000 emails/day + 30 emails/minute. (please see https://learn.microsoft.com/en-us/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits for reference)
The 100,000/day are usually not a problem, but the 30/minute might become an issue the moment your site attracts a lot of visitor who register and interact.
We use e.g. Amazon SES. Mailgun does a decent job, too. Costs are quite low in both cases.
You need to adjust your SPF-record for the domain that you use / have in Microsoft 365 and can send a lot of "technical" emails like the ones from Ory from that other service without messing with Microsoft 365.
c
curved-fountain-46946
03/30/2023, 9:23 AM
That's kinda funny, with a 30 mails per minute limit, even if you spam as many mails as possible you won't even get remotely close to 100k per day :p
c
curved-wolf-66275
03/30/2023, 9:26 AM
I know ... These limits have been there for quite a long time and it seems that nobody has ever re-evaluated and done the math.
😄 1
a
acoustic-insurance-23566
03/30/2023, 11:59 AM
Thanks for the ideas! @fast-lunch-54279, there are a few configuration options to set up on the Microsoft side for this to work. So far I tried only writing a script to send emails using SMTP and I didn't get that to work yet. It didn't make sense to me to try with Ory if I can't get it to work in a simple setup first.
@curved-wolf-66275, thank you for your suggestions for using SES or Mailgun. That might be a better idea. Especially with the rate limitations on Office 365. I wasn't aware of those so thank you for pointing it out!