/[drupal]/contributions/modules/regcode/regcode_mailer/regcode_mailer.module
ViewVC logotype

Diff of /contributions/modules/regcode/regcode_mailer/regcode_mailer.module

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

revision 1.1.2.3, Mon Oct 5 21:58:47 2009 UTC revision 1.1.2.4, Sat Oct 10 20:39:30 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: regcode_mailer.module,v 1.1.2.2 2009/10/01 21:39:23 aidan Exp $  // $Id: regcode_mailer.module,v 1.1.2.3 2009/10/05 21:58:47 aidan Exp $
3    
4    
5  /**  /**
# Line 150  function regcode_mailer_regcode_filters( Line 150  function regcode_mailer_regcode_filters(
150  function regcode_mailer_regcode_action_gotomail() {  function regcode_mailer_regcode_action_gotomail() {
151    drupal_goto('admin/user/regcodes/mail');    drupal_goto('admin/user/regcodes/mail');
152  }  }
153    
154    
155    /**
156     * Implements hook_mail()
157     */
158    function regcode_mailer_mail($key, &$message, $params) {
159      switch($key) {
160        case 'regcode_mail':
161          $message['subject'] = $params['subject'];
162          $body = $params['message'];
163          foreach ($params['tokens'] as $key => $value) {
164            $body = str_replace("%{$key}%", $value, $body) ;
165          }
166          $message['body'][] = $body;
167          break;
168      }
169    
170      return $message;
171    }

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

  ViewVC Help
Powered by ViewVC 1.1.2