سؤال

We have been using SendGrid for some time for transactional email delivery, however - we are starting to send bulk packages of email at various intervals in an automated manner.

We are trying to find a way to send these bulk emails to sendgrid for delivery instead of our current process (looping over a list of users and sending the email iteratively)

Using something other than sendgrid is not an option

We need to basically have a way to upload a list of users, replacement values for keywords in the email: %first_name%, %username% etc - in order to send these emails to users.

What would be the best way to accomplish this?

هل كانت مفيدة؟

المحلول

There are a number of ways you can do this within the existing SendGrid infrastructure.

You sound like you'd be a good fit for the SendGrid Marketing Email API. With this API, you can add users to lists with custom fields (e.g. username); create email templates (complete with substitution for custom fields; assign different lists to email templates, and then schedule them to send.

The other option is to use SendGrid's SMTPAPI with Substitution Tags. Here you can specify any amount of arbitrary fields and then send it to the emails you specify using one API call.

نصائح أخرى

There may be a better way, but if it was me I would use ParallelCurl. I've used it in the past to send bulk SMS and it worked great for me. The project hasn't been updated in a while though, but it works.

Have a look:

https://github.com/petewarden/ParallelCurl

Good Luck.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top