function mandrill_test_form in Mandrill 6
Same name and namespace in other branches
- 7.2 mandrill.admin.inc \mandrill_test_form()
- 7 mandrill.admin.inc \mandrill_test_form()
Return a form for sending a test email.
_state
Parameters
string $form:
Return value
array $form
1 string reference to 'mandrill_test_form'
- mandrill_menu in ./
mandrill.module - Implements hook_menu().
File
- ./
mandrill.admin.inc, line 167 - Administrative forms for Mandrill module.
Code
function mandrill_test_form(&$form_state) {
drupal_set_title(t('Send test email'));
$form['mandrill_test_address'] = array(
'#type' => 'textfield',
'#title' => t('Email address to send a test email to'),
'#default_value' => variable_get('site_mail', ''),
'#description' => t('Type in an address to have a test email sent there.'),
'#required' => TRUE,
);
$form['mandrill_test_body'] = array(
'#type' => 'textarea',
'#title' => t('Test body contents'),
'#default_value' => t('If you receive this message it means your site is capable of using Mandrill to send email. This <a href="http://drupal.org">link</a> is here to test click tracking.'),
);
$form['include_attachment'] = array(
'#title' => t('Include attachment'),
'#type' => 'checkbox',
'#description' => t('If checked, the Drupal icon will be included as an attachment with the test email.'),
'#default_value' => TRUE,
);
$form['test_submit'] = array(
'#type' => 'submit',
'#value' => t('Send test email'),
);
$form['test_cancel'] = array(
'#type' => 'markup',
'#value' => l(t('Cancel'), 'admin/settings/mandrill'),
);
return $form;
}