Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29919

How can we send multiple emails via a transactional email service API without having the API request take a long time to reply?

$
0
0

Details:

We use WordPress as our websiteThe admin sends one email to our 500 users a dayThe emails are being sent via wp_mail() with $to as an array of 500 usersWe use SendGrid as our transactional email service

Problem:

The website script waits until Sendgrid responds to the wp_mail request to say done. And the spinner on the web page shows the entire time while waiting for SendGrid to respond. This can take up to 20 minutes.

We now have 2 options to solve this problem.

Questions:

For option 1:

Where is the bottleneck? At WP mail or SendGrid or somewhere else?How can we increase the speed of the mails to be sent?

For option 2:

How can we initiate the sending of emails and not have the script wait for a “sent” response from Sendgrid/WP mail?


Viewing all articles
Browse latest Browse all 29919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>