For our product we need to be able to schedule email messages for a recipient. Our product also wants to ensure that the recipient doesn't get spammed by too many messages. So, we are looking for an API that allows our product to schedule the messages over to the API and if the API finds more than one message scheduled for the same time, then it combines them in a reasonably intelligent manner.
Example, the product calls API with following requests:
- to: test@test.com, title: "You need to approve request 123" message: "XYZ", schedule: 2PM
- to: test@test.com, title: "You request for 234 has been approved" message: "PQR", schedule: 2PM
At 2PM, test@test.com receives the following:
- title: "Messages from Product"
- messages: <Combined message from title and message of the two above>
It seems that MailGun fits our general requirements except for this one requirement. Is there an API that solves this? If not, how do others solve it?