views_send.admin.inc 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. if (VIEWS_SEND_MIMEMAIL) {
  14. $form['views_send_attachment_valid_extensions'] = array(
  15. '#type' => 'textfield',
  16. '#title' => t('Valid file extensions for attachments'),
  17. '#default_value' => variable_get('views_send_attachment_valid_extensions', ''),
  18. '#description' => t('A space separated list of allowed file extensions for attachments. Leave the list empty if you want to use the default list from file_save_upload().'),
  19. );
  20. }
  21. $throttle = drupal_map_assoc(array(1, 10, 20, 30, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000));
  22. $throttle[0] = t('Unlimited');
  23. $form['views_send_throttle'] = array(
  24. '#type' => 'select',
  25. '#title' => t('Cron throttle'),
  26. '#options' => $throttle,
  27. '#default_value' => variable_get('views_send_throttle', 20),
  28. '#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'))),
  29. );
  30. $form['views_send_spool_expire'] = array(
  31. '#type' => 'select',
  32. '#title' => t('Mail spool expiration'),
  33. '#options' => array(0 => t('Immediate'), 1 => t('1 day'), 7 => t('1 week'), 14 => t('2 weeks')),
  34. '#default_value' => variable_get('views_send_spool_expire', 0),
  35. '#description' => t('E-mails are spooled. How long must messages be retained in the spool after successfull sending.'),
  36. );
  37. $form['views_send_debug'] = array(
  38. '#type' => 'checkbox',
  39. '#title' => t('Log e-mails'),
  40. '#default_value' => variable_get('views_send_debug', FALSE),
  41. '#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.'),
  42. );
  43. return system_settings_form($form);
  44. }