You are here

function simplenews_request_hash_submit in Simplenews 7.2

Request new hash form submit callback.

File

includes/simplenews.subscription.inc, line 779
(Un)subscription and (un)subscription confirmation

Code

function simplenews_request_hash_submit($form, &$form_state) {
  module_load_include('inc', 'simplenews', 'includes/simplenews.mail');
  $params['from'] = _simplenews_set_from();
  $params['context'] = $form_state['context'];
  $subscriber = $params['context']['simplenews_subscriber'];
  drupal_mail('simplenews', $form_state['key'], $subscriber->mail, $subscriber->language, $params, $params['from']['address']);
  drupal_set_message(t('The confirmation mail has been sent.'));
  $form_state['redirect'] = '';
}