You are here

function mail_safety_admin_settings_form in Mail Safety 7.2

Same name and namespace in other branches
  1. 7 mail_safety.admin.inc \mail_safety_admin_settings_form()

Form constructor for the Mail Safety settings form.

1 string reference to 'mail_safety_admin_settings_form'
mail_safety_menu in ./mail_safety.module
Implements hook_menu().

File

./mail_safety.admin.inc, line 12
Admin functionality for Mail Safety

Code

function mail_safety_admin_settings_form() {
  $form = array();
  $form['mail_safety_enabled'] = array(
    '#title' => t('Stop outgoing mails'),
    '#type' => 'checkbox',
    '#description' => t('When Mail Safety is enabled it will stop all outgoing emails from being sent and will send them to either the dashboard and/or the defaut mail address instead.'),
    '#default_value' => variable_get('mail_safety_enabled', FALSE),
  );
  $form['mail_safety_send_mail_to_dashboard'] = array(
    '#title' => t('Send mail to dashboard'),
    '#type' => 'checkbox',
    '#description' => t('If enabled, all mails will be sent to the dashboard'),
    '#default_value' => variable_get('mail_safety_send_mail_to_dashboard', TRUE),
  );
  $form['mail_safety_send_mail_to_default_mail'] = array(
    '#title' => t('Send mail to default mail'),
    '#type' => 'checkbox',
    '#description' => t('If enabled, all mails will be sent to the the default mail address'),
    '#default_value' => variable_get('mail_safety_send_mail_to_default_mail', TRUE),
  );
  $form['mail_safety_default_mail_address'] = array(
    '#title' => t('Default mail address'),
    '#type' => 'textfield',
    '#description' => t('The default email address that outgoing e-mails will be rerouted to if enabled.'),
    '#default_value' => variable_get('mail_safety_default_mail_address', ''),
  );
  return system_settings_form($form);
}