Search code examples
asp.netoutlookms-officeoffice365office365api

Bulk email sending using Office 365


We are currently developing a system for a client who regularly sends batches of emails (can be anywhere from 5 to 500) to their customers. They have asked us if we are able to send it via their Office 365 account so that they can see the emails in their sent box. There is also the possibility that multiple users can trigger these emails at the same time to different customers, so we can't tell how many are going to be sent at any given time.

We have experience sending via SMTP, however not to this scale, and it looks like the sending limits would be an issue (30 per minute, 10,000 per day).

We have considered using a method to pool the emails going out and limit the rate they are sent to get around the limits (up to the 10,000 per day).

Is there a better way to send bulk mail using Office 365? Or are we trying to do something that it isn't designed to do?


Solution

  • These throttling limits are controlled by the Transport process within Exchange. As such, any protocol (SMTP, EWS, REST, etc...) that you use in O365 will be subject to the same limitation. One option, assuming you want them coming from the same account is to create several accounts, given them SendAs rights to the account you want the emails coming from and then break up the pool of emails to send into separate queues for each service account. I haven't looked at the transport throttling code in a while, but IIRC, it throttles based on authenticated user rather than sender. Of course, be reasonable about it - if you create 5000 service accounts, one for each email, then that would just be silly :) Figure out what SLA you want. Given that you can send 30/min, 5 accounts could do 150/min. That would get you through the list in less than 4 minutes.