2

Is there an email service that allows you to nicely query your own database to create the recipients list? The issue is that we do tons of specialized user segmentation to create lists of recipients. Trying to keep our database in sync with the email-service's database is risky and fraught with potential issues since user data will be updated frequently in multiple ways. But we still need the powerful features of a service like SendGrid or Mailchimp where such as A/B testing, open & click-rate reporting, WYSIWYG template design, etc.

My pipe dream is to have a service like Sendgrid or Mailchimp, but when it asks you who to send the email to, you specify parameters that you've created yourself. It sends these parameters to your server, and your server (using a little code that you've custom-written), performs a query on your user database and sends the recipient list back.

Does such a service exist?

J-bob
  • 8,380
  • 11
  • 52
  • 85
  • 1
    This really isn't a programming question, so it doesn't belong on [so]. At any rate, these services have APIs which you can use to programmatically send emails, which I think is what you're looking for. – Matt Ball Oct 03 '13 at 23:33
  • where would be the best place to post this question? – J-bob Oct 03 '13 at 23:36

1 Answers1

4

You can do this with SendGrid, by specifying an external URL as your recipients input method.

When specifying the external URL you may select "Activate Dynamic Mode". Dynamic mode checks the URL when a Marketing Email is scheduled/sent, and updates the list accordingly.

Knowing this, you could specify an external URL whose parameters control a database query. This database query would eventually resolve to a CSV which SendGrid would process at send time. Thus removing the need to keep two databases in sync.


N.B. Dynamic mode has been known to have some problems if you specify additional columns in your csv (beyond name,email). This is slated to be fixed, however, as of this answer it has not been. If you create the list at send time, this problem will not occur.

Nick Q.
  • 3,947
  • 2
  • 23
  • 37
  • Ok, I had tried creating the list at send time before, but it didn't work. I then reduced CSV fields to two (instead of name, I have something else), and now it seems to work. You really should allow more fields to work with dynamic code, because I suspect we will use more fields in the future. – J-bob Oct 11 '13 at 18:47
  • It's in the works, it's a known issue and will be fixed soon, _(hopefully)_. – Nick Q. Oct 12 '13 at 02:40
  • Any chance this is already fixed? I will need to implement this soon and probably I will need more than `name` and `email` – Alex Mar 14 '14 at 15:45
  • SendGrid has a few other problems on the importing side. Currently (as of this week), you can't import a CV without it displaying the wrong data to you. (Once you click continue, it will import the data correctly, but I had to learn this by chatting with their customer support. It is a "known issue".) Their template editor also has problems, and twice already in as many days, it's completely deleted my template before saving it, thus wasting hours of my time. That said, I haven't found a great replacement for it yet. If you know of one, let me know! – stevejboyer Aug 30 '14 at 06:13