Abhishek Luv

Freelance Trainer for ASP.NET MVC, Entity Framework..

Receiving Email Notifications for New Subscribers With Sendy.co

Sendy is one of the best Emailer software out there on the web. I love Sendy.

Sendy + Amazon SES = Awesomeness

But sendy doesn’t have a feature of receiving email notifications when new subscribers register on our websites.

I have figured out to do it using an email service called “Mandrill” by sending email to myself using ajax calls.

Mandrill is an email infrastructure service. With the API of Mandrill, we can send email only by JavaScript.

Steps

  1. Create a new Mandrill account
  2. Get your Mandrill API Key
  3. Verify your Domain Name and Email Address
  4. Add TXT SPF and DKIM records for authentication for your Domain name
  5. Wait for the records to propagate
  6. Use the below given code with your API key to receive email notification after someone registers using the sendy form

Sample Sendy Subscribe Form

When we create a new list using sendy we get this subscribe form which we can embed on our websites for our users to subscribe.

Note : Your form code may differ.

jQuery code for receiving email notifications using Mandrill

The below given code checks all the input boxes and then sends a post request to mandrill with all the form input values using AJAX. Mandrill then replies back by sending an email to you.

In order to receive email notifications for every sendy form you will have to add the above javascript and jquery code for every sendy form and even alter the form IDs and javascript variables.

Note : Keep in mind that your API key is visible to anyone, so any malicious user may use your key to send out emails that can eat up your quota.

Comments