You are here

function newsletter_configure_submit in Newsletter 7

Same name and namespace in other branches
  1. 7.2 includes/newsletter.admin.inc \newsletter_configure_submit()
1 string reference to 'newsletter_configure_submit'
newsletter_configure in includes/newsletter.admin.inc
Menu callback; present newsletter configuration.

File

includes/newsletter.admin.inc, line 1535
Admin page callbacks for the newsletter module.

Code

function newsletter_configure_submit($form, &$form_state) {
  if ($form_state['clicked_button']['#value'] == t('Send')) {
    $status = newsletter_create()
      ->sendTest(variable_get('newsletter_test_to', variable_get('site_mail')));
    if ($status) {
      drupal_set_message(t('Test mail sent successfully!'), 'status');
    }
    else {
      drupal_set_message(t('Your test mail failed to be delivered.Please check your server logs for more information.'), 'error');
    }
  }
}