You are here

function swiftmailer_admin_test_form_submit in Swift Mailer 7

Submit handler for swiftmailer_admin_test_form.

File

includes/pages/swiftmailer_admin_test.inc, line 61
An administration page which allows for sending a test e-mail.

Code

function swiftmailer_admin_test_form_submit($form, &$form_state) {
  if (isset($form_state['values']['test']['recipient'])) {
    drupal_mail('swiftmailer', 'test', $form_state['values']['test']['recipient'], language_default());
    drupal_set_message(t('An attempt has been made to send an e-mail to @email.', array(
      '@email' => $form_state['values']['test']['recipient'],
    )));
  }
}