Get the list of mail chimp subscribers in rails -


i working on simple rails rails app , have many subscribers in mail mailchimp account , want subscribers , send mail rails app. how subscribers emails in array.

my code sample below

def send_now     @news_letter = newsletter.find(params[:id])         gb = gibbon::api.new("xxx")       members = gb.lists.members({:id => 'xxx'})       #for each goes here send mail          redirect_to manage_news_letter_path(@news_letter), notice: "sent news letter"           end  

i can list of subscribers how can split out email for_each method in rails cos format in hash. thanks.

example output below

{"email"=>"xx@xx.com", "id"=>"xx", "euid"=>"xx", "email_type"=>"html", "ip_signup"=>nil, "timestamp_signup"=>nil, "ip_opt"=>"208.68.37.172", "timestamp_opt"=>"2014-02-21 10:38:20", "member_rating"=>2, "info_changed"=>"2014-02-21 10:38:20", "web_id"=>xx, "leid"=>xx, "language"=>nil, "list_id"=>"xx", "list_name"=>"blanckdigital website list", "merges"=>{"email"=>"xx@xx.com", "fname"=>"", "lname"=>""}, "status"=>"subscribed", "timestamp"=>"2014-02-21 10:38:20", "is_gmonkey"=>false, "lists"=>[], "geo"=>[], "clients"=>[], "static_segments"=>[], "notes"=>[]}

what want is email xx@xx.com alone each of subscribers


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -