You are here

function mandrill_test_form in Mandrill 7

Same name and namespace in other branches
  1. 6 mandrill.admin.inc \mandrill_test_form()
  2. 7.2 mandrill.admin.inc \mandrill_test_form()

Return a form for sending a test email.

1 string reference to 'mandrill_test_form'
mandrill_menu in ./mandrill.module
Implements hook_menu().

File

./mandrill.admin.inc, line 231
Administrative forms for Mandrill module.

Code

function mandrill_test_form($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 url is here to test click tracking: !link', array(
      '!link' => l(t('link'), 'http://www.drupal.org/project/mandrill'),
    )),
  );
  $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' => 'link',
    '#href' => 'admin/config/services/mandrill',
    '#title' => t('Cancel'),
  );
  return $form;
}