function mail_debugger_basic_form_submit in Mail Debugger 7.3
Parameters
type $values:
type $form_state:
1 string reference to 'mail_debugger_basic_form_submit'
- mail_debugger_common_mail_debugger_info in modules/
common/ mail_debugger_common.module - Implement hook_mail_debugger_info();
File
- modules/
common/ includes/ basic.mail_debugger.inc, line 56
Code
function mail_debugger_basic_form_submit($values, &$form_state) {
// Send the mail
$mail = drupal_mail('mail_debugger_common', 'basic', $values['to'], NULL, array(
'body' => $values['body'],
'subject' => $values['subject'],
));
// Notify about the result
if ($mail && $mail['result']) {
drupal_set_message(t('Message sent'));
}
else {
drupal_set_message(t('Message sent with errors. Check the error log.'), 'warning');
}
}