You are here

function maillog_admin_settings in Maillog / Mail Developer 6

Same name and namespace in other branches
  1. 7 maillog.admin.inc \maillog_admin_settings()

Implementation of the module settings form.

1 string reference to 'maillog_admin_settings'
maillog_menu in ./maillog.module
Implementation of hook_menu().

File

./maillog.module, line 111
Provides a 'maillog' node type

Code

function maillog_admin_settings() {
  $form = array();
  $form['maillog_send'] = array(
    '#type' => 'checkbox',
    '#title' => t("Allow the e-mails to be sent."),
    '#default_value' => variable_get('maillog_send', TRUE),
  );
  $form['maillog_log'] = array(
    '#type' => 'checkbox',
    '#title' => t("Create table entries in maillog table for each e-mail."),
    '#default_value' => variable_get('maillog_log', TRUE),
  );
  $form['maillog_devel'] = array(
    '#type' => 'checkbox',
    '#title' => t("Display the e-mails on page using devel module (if enabled)."),
    '#default_value' => variable_get('maillog_devel', TRUE),
  );
  if (module_exists('mimemail')) {
    $engines = mimemail_get_engines();

    // maillog will be unset, because ist would cause an recursion
    unset($engines['maillog']);
    $form['maillog_engine'] = array(
      '#type' => 'select',
      '#title' => t("Select the mailengine which should be used."),
      '#default_value' => variable_get('maillog_engine', 'mimemail'),
      '#options' => $engines,
    );
  }
  return system_settings_form($form);
}