Soda Crackers Soda Crackers - 1 year ago 74
PHP Question

Mass emails with individual coupon codes

I'm trying to send email coupon codes to a list of different people. The idea is that they:

  1. Go to the landing page

  2. Input their email

  3. Receive an email with a coupon code for a coffee shop

We're using Mailchimp, and I've been racking my brain trying to figure out how to do this. I've only done design and some JavaScript development, so I'm not even sure where to begin. I was thinking something along the lines of:

  1. Collect all the submitted emails in a

  2. Purchase the bulk of coupon codes

  3. Use PHP (SendGrid or Swiftmailer or something) to match up the list of codes with the emails and send them out.

Any thoughts on the best way to do this?

Answer Source

You can use MailChimps merge tags

The process looks as follows:

  • generate unique coupon codes, you can use an online generator
  • use MailChimp API to create merge fields
  • assign codes through this merge field with members endpoint
  • design and run a new campaign that includes the new merge tag which will be replaced with a unique code

You can also use a coupon infrastructure API like this one Disclaimer: I'm a cofounder

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download