views_send.admin.inc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * @file
  4. * Views Send administration page.
  5. *
  6. * @ingroup views_send
  7. */
  8. /**
  9. * Callback for admin/settings/views_send menu item.
  10. */
  11. function views_send_settings() {
  12. $form = array();
  13. $throttle = drupal_map_assoc(array(1, 10, 20, 30, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000));
  14. $throttle[0] = t('Unlimited');
  15. $form['views_send_throttle'] = array(
  16. '#type' => 'select',
  17. '#title' => t('Cron throttle'),
  18. '#options' => $throttle,
  19. '#default_value' => variable_get('views_send_throttle', 20),
  20. '#description' => t('Sets the numbers of messages sent per cron run. Failure to send will also be counted. Cron execution must not exceed the PHP maximum execution time of %max seconds. You find the time spend to send e-mails in the !recent_logs.', array('%max' => ini_get('max_execution_time'), '!recent_logs' => l(t('Recent log entries'), 'admin/reports/dblog'))),
  21. );
  22. $form['views_send_spool_expire'] = array(
  23. '#type' => 'select',
  24. '#title' => t('Mail spool expiration'),
  25. '#options' => array(0 => t('Immediate'), 1 => t('1 day'), 7 => t('1 week'), 14 => t('2 weeks')),
  26. '#default_value' => variable_get('views_send_spool_expire', 0),
  27. '#description' => t('E-mails are spooled. How long must messages be retained in the spool after successfull sending.'),
  28. );
  29. $form['views_send_debug'] = array(
  30. '#type' => 'checkbox',
  31. '#title' => t('Log e-mails'),
  32. '#default_value' => variable_get('views_send_debug', FALSE),
  33. '#description' => t('When checked all outgoing mesages are logged in the system log. A logged e-mail does not guarantee that it is send or will be delivered. It only indicates that a message is send to the PHP mail() function. No status information is available of delivery by the PHP mail() function.'),
  34. );
  35. return system_settings_form($form);
  36. }