| 1. | Call Centers Philippines | my website | 03/17/2010 04:34:26 |
Hello. I agree, the Mad Mimi's API is brilliant. It will certainly appeal to marketing enthusiasts who will get to read your post. Thank you for sharing !
I recently got the E-Mail Marketing itch. I realized we have a great email list that we haven't tapped into at all. The thing is I don't want to just blast the same email to everyone, I want the email to be semi-intelligent, ie. 2 days after someone signs up they get an email with helpful tips.
Enter Mad Mimi's new Mailer API. This is just brilliant IMO, exactly what I was looking for. Basically they have a simple API to send out one-off or "Transactional" emails through their system. What are the benefits?
Now when a customer signs up, or their credit card is declined or whatever, instead of getting dry ugly text they get a rich friendly looking email. Plus I can track what's happening and improve the emails as time goes by.
I can also create a system where I choose when to send other promotions based on the user's behavior. This sort of personalized response is the best way to get through with E-Mail Marketing these days.
It's not necessary to go into a full-tutorial here, simply because Mad Mimi's developer center covers it well, and it's not that complicated in the first place. But I will cover the basics.
First install the gem. Make sure you've added github to your list of gem repositories.
$ gem sources -a http://gems.github.com (you only have to do this once)
$ sudo gem install mad_mimi_mailer
I had a version conflict with ActiveSupport so I froze the gem, but that's up to you.
What they've done is extend ActionMailer, so changing your emails to Mad Mimi is stupid simple. Essentially you put in your api creds, change the base class and add mimi_ to the front of all the methods. You'll also need to specify the name of the promotion.
MadMimiMailer.api_settings = {
:username => 'ben@doodlekit.com',
:api_key => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
}
class BillerMailer < MadMimiMailer
def mimi_suspended(customer_site)
settings = SystemSetting.find(:first)
promotion "Account Suspended"
@subject = 'Doodlekit Alert - Your Website Has Been Suspended'
@body = {}
@recipients = customer_site.email_address
@from = settings.admin_email
@body[:customer_name] = customer_site.full_name
@body[:site_title] = customer_site.site_name
@body[:site_url] = customer_site.url
end
This mailer is using a promotion called "Account Suspended", so there must be a promotion with that name in my Mad Mimi account. The elements in the @body hash are mapped to variables in your Mad Mimi Promotion. :customer_name maps to {customer_name}.
Then just change your deliver call to include mimi_
BillerMailer.deliver_mimi_suspended(customer_site)
That's it!
One quick helpful tip. If your having issues and would like to see what's going on between you and the API you can enable HTTP debugging by adding the following line in the post_request method in mad_mimi_mailer.rb.
http.set_debug_output $stdout
Kind of Hackish, but good if you're in a bind.
I'm super happy about how this turned out, and plan to explore the other area's of Mad Mimi's API. And of course it's always great for sending out regular promotions to your email list.
| 1. | Call Centers Philippines | my website | 03/17/2010 04:34:26 |
Hello. I agree, the Mad Mimi's API is brilliant. It will certainly appeal to marketing enthusiasts who will get to read your post. Thank you for sharing !
Post a Comment