function postmark_settings_form_submit in Postmark 7
Same name and namespace in other branches
- 6 postmark.admin.inc \postmark_settings_form_submit()
Submit callback; send a test email and show message about smtp status
1 string reference to 'postmark_settings_form_submit'
- postmark_settings_form in ./
postmark.admin.inc - Setting form for Postmark
File
- ./
postmark.admin.inc, line 73 - Administration include for Postmark.
Code
function postmark_settings_form_submit($form, &$form_state) {
// If an address is submitted, send a test email message.
$test_address = $form_state['values']['test_address'];
if ($test_address != '') {
drupal_set_message(t('A test e-mail has been sent to %email. You may want to <a href="!watchdog">check the logs</a> for any error messages.', array(
'%email' => $test_address,
'!watchdog' => url('admin/reports/dblog'),
)), 'warning');
drupal_mail('postmark', 'test', $test_address, NULL);
unset($form_state['values']['test_address']);
}
}