You are here

function regcode_mailer_mail_action_submit in Registration codes 7

Same name and namespace in other branches
  1. 6.2 regcode_mailer/regcode_mailer.module \regcode_mailer_mail_action_submit()
  2. 7.2 regcode_mailer/regcode_mailer.module \regcode_mailer_mail_action_submit()

Submit action for the form.

File

regcode_mailer/regcode_mailer.module, line 92
Main code functionality and hooks of regcode_mailer module.

Code

function regcode_mailer_mail_action_submit($form, $form_state) {
  $emails = array_filter(explode("\n", $form_state['values']['regcode_mailer_emails']));
  array_map('trim', $emails);
  return array(
    'subject' => $form_state['values']['regcode_mailer_subject'],
    'message' => $form_state['values']['regcode_mailer_message'],
    'emails' => $emails,
    'terms' => array_filter($form_state['values']['regcode_mailer_tags']),
  );
}