reroute_email.variable.inc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * @file
  4. * Variable module integration.
  5. */
  6. /**
  7. * Implements hook_variable_info().
  8. */
  9. function reroute_email_variable_info() {
  10. $variable = array();
  11. $variable[REROUTE_EMAIL_ENABLE] = array(
  12. 'title' => t('Enable rerouting'),
  13. 'description' => t('Check this box if you want to enable email rerouting. Uncheck to disable rerouting.'),
  14. 'type' => 'boolean',
  15. 'default' => 0,
  16. 'group' => 'reroute_email',
  17. );
  18. $variable[REROUTE_EMAIL_ADDRESS] = array(
  19. 'title' => t('Email addresses'),
  20. 'description' => t('Provide a space, comma, or semicolon-delimited list of email addresses to pass through. Every destination email address which is not on this list will be rerouted to the first address on the list.'),
  21. 'default' => variable_get('site_mail', ini_get('sendmail_from')),
  22. 'group' => 'reroute_email',
  23. );
  24. $variable[REROUTE_EMAIL_ENABLE_MESSAGE] = array(
  25. 'title' => t('Show rerouting description in mail body'),
  26. 'description' => t('Check this box if you want a message to be inserted into the email body when the mail is being rerouted. Otherwise, SMTP headers will be used to describe the rerouting. If sending rich-text email, leave this unchecked so that the body of the email will not be disturbed.'),
  27. 'type' => 'boolean',
  28. 'default' => 1,
  29. 'group' => 'reroute_email',
  30. );
  31. return $variable;
  32. }
  33. /**
  34. * Implements hook_variable_group_info().
  35. */
  36. function reroute_email_variable_group_info() {
  37. $groups['reroute_email'] = array(
  38. 'title' => t('Reroute Email'),
  39. 'description' => t('Reroute email configuration settings'),
  40. 'access' => 'administer reroute email',
  41. 'path' => array('admin/config/development/reroute_email'),
  42. );
  43. return $groups;
  44. }