function htmlmail_test_form in HTML Mail 7
Same name and namespace in other branches
- 8.2 htmlmail.admin.inc \htmlmail_test_form()
- 5 htmlmail.module \htmlmail_test_form()
- 6.2 htmlmail.admin.inc \htmlmail_test_form()
- 6 htmlmail.admin.inc \htmlmail_test_form()
- 7.2 htmlmail.admin.inc \htmlmail_test_form()
Builds a form for sending a test message.
1 string reference to 'htmlmail_test_form'
- htmlmail_menu in ./
htmlmail.module - Implements hook_menu().
File
- ./
htmlmail.admin.inc, line 134 - Admin forms for HTML Mail
Code
function htmlmail_test_form($form_values = NULL) {
// set up some defaults for test mail
$defaults = variable_get('htmlmail_test', array(
'to' => variable_get('site_mail'),
'subject' => 'test',
'body' => array(
'value' => 'test',
'format' => filter_fallback_format(),
),
));
$form['to'] = array(
'#type' => 'textfield',
'#title' => t('To'),
'#default_value' => $defaults['to'],
'#maxlength' => 128,
'#required' => TRUE,
);
$form['subject'] = array(
'#type' => 'textfield',
'#title' => t('Subject'),
'#default_value' => $defaults['subject'],
'#maxlength' => 128,
'#required' => TRUE,
);
$form['body'] = array(
'#type' => 'text_format',
'#title' => t('Body'),
'#rows' => 20,
'#default_value' => $defaults['body']['value'],
'#format' => $defaults['body']['format'],
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Send test message'),
);
return $form;
}