You are here

function mandrill_get_tags in Mandrill 6

Get all available MailChimp STS tags

Return value

array of tag objects

File

./mandrill.module, line 95
Enables Drupal to send email directly through MailChimp STS.

Code

function mandrill_get_tags() {
  $ret = array();
  $mandrill = mandrill_get_api_object();
  $tags = $mandrill
    ->tags_list();
  if ($tags) {
    foreach ($tags as $tag) {
      $ret[$tag['tag_id']] = $tag;
    }
  }
  return $ret;
}