Cameron Yule

Mailbuild gem 1.1

I’ve pushed a small update to the Mailbuild gem this morning which adds support for multiple subscriber lists, enabling you to manage different types of subscribers from within your application.

The sample Rails application has also been updated to take into account the slightly changed syntax for specifying your list id(s);

Mailbuild.list_id = 'LIST_ID_HERE'

…is now…

Mailbuild.list_ids = {:newsletter = 'LIST_ID_HERE'}

All API calls take a list id as their last parameter, which defaults to the first id you declare in the list_ids hash.

You can use a specific subscriber list id as follows;

Mailbuild.add(params[:email], params[:name], Mailbuild.list_ids[:newsletter])

The documentation explains what parameters each method accepts.

Published on September 3, 2008 in Programming
No Comments