/[drupal]/contributions/modules/reroute_email/reroute_email.module
ViewVC logotype

Diff of /contributions/modules/reroute_email/reroute_email.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.2, Tue Jul 31 23:30:15 2007 UTC revision 1.1.2.3, Wed Aug 1 01:04:53 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2    
3  // $Id: reroute_email.module,v 1.1.2.1 2007/07/29 20:00:17 kbahey Exp $  // $Id: reroute_email.module,v 1.1.2.2 2007/07/31 23:30:15 kbahey Exp $
4    
5  define('REROUTE_EMAIL_ADDRESS', 'reroute_email_address');  define('REROUTE_EMAIL_ADDRESS',  'reroute_email_address');
6    define('REROUTE_EMAIL_DEV_NULL', 'reroute_email_dev_null');
7    
8  function reroute_email_menu($may_cache) {  function reroute_email_menu($may_cache) {
9    $items = array();    $items = array();
# Line 22  function reroute_email_menu($may_cache) Line 23  function reroute_email_menu($may_cache)
23  }  }
24    
25  function reroute_email_settings() {  function reroute_email_settings() {
26      $form[REROUTE_EMAIL_DEV_NULL] = array(
27        '#type'          => 'checkbox',
28        '#title'         => t('Disable all mails'),
29        '#default_value' => variable_get(REROUTE_EMAIL_DEV_NULL, FALSE),
30        '#description'   => t('Check this to disable all outgoing email from this web site.'),
31      );
32    
33    $form[REROUTE_EMAIL_ADDRESS] = array(    $form[REROUTE_EMAIL_ADDRESS] = array(
34      '#type'          => 'textfield',      '#type'          => 'textfield',
35      '#title'         => t('Email address'),      '#title'         => t('Email address'),
# Line 37  function reroute_email_settings() { Line 45  function reroute_email_settings() {
45  function reroute_email_mail_alter(&$mailkey, &$to, &$subject, &$body, &$from, &$headers) {  function reroute_email_mail_alter(&$mailkey, &$to, &$subject, &$body, &$from, &$headers) {
46    global $base_url;    global $base_url;
47    
48      if (variable_get(REROUTE_EMAIL_DEV_NULL, FALSE)) {
49        return;
50      }
51    
52    // Format a message to show at the top    // Format a message to show at the top
53    $msg  = "This email was rerouted.\n";    $msg  = "This email was rerouted.\n";
54    $msg .= "Web site: @site\n";    $msg .= "Web site: @site\n";

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

  ViewVC Help
Powered by ViewVC 1.1.2