-
Notifications
You must be signed in to change notification settings - Fork 582
Open
Labels
difficulty: easyfix is easy in difficultyfix is easy in difficultystatus: help wantedrequesting help from the communityrequesting help from the communitytype: docs updatedocumentation change not affecting the codedocumentation change not affecting the code
Description
I am currently using the following approach:
var tasks = new List<Task>();
for (int i=0; i <100; i++)
{
var task = SendEmailUsingSendgridApiAsync(message);
tasks.Add(task);
}
Task.WaitAll(tasks.ToArrayList());
This approach takes 4s for 100 emails vs 20s if I just send emails one by one. So about 5X faster.
(Single email takes 200ms.)
Is there a recommended approach to send 1000s of emails quickly using SendGrid .NET API?
For 100K emails, even using async approach it still will take about an hour.
Also are there plans to just add REST endpoint on Sendgrid API that would allow sending batches of emails (for ex 100 at a time) in a single request. This way you guys can handle it on Sendgrid side.
Metadata
Metadata
Assignees
Labels
difficulty: easyfix is easy in difficultyfix is easy in difficultystatus: help wantedrequesting help from the communityrequesting help from the communitytype: docs updatedocumentation change not affecting the codedocumentation change not affecting the code