createHiddenGroup(); $mailing = civicrm_api3('Mailing', 'create', array( 'name' => "", 'campaign_id' => NULL, 'replyto_email' => "", 'template_type' => $templateTypes[0]['name'], 'template_options' => array('nonce' => 1), 'subject' => "", 'body_html' => "", 'body_text' => "", 'groups' => array( 'include' => array($groupId), 'exclude' => array(), 'base' => array(), ), 'mailings' => array( 'include' => array(), 'exclude' => array(), ), )); CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/a/', NULL, TRUE, '/mailing/' . $mailing['id'])); } }