source: trunk/include/functions_mail.inc.php @ 2262

Last change on this file since 2262 was 2262, checked in by rub, 16 years ago

Fix bug of svn:2249
Fix quicky mail error with smarty

  • Property svn:keywords set to Author Date Id Revision
File size: 21.4 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | PhpWebGallery - a PHP based picture gallery                           |
4// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
6// +-----------------------------------------------------------------------+
7// | file          : $Id: functions_mail.inc.php 2262 2008-03-07 06:42:43Z rub $
8// | last update   : $Date: 2008-03-07 06:42:43 +0000 (Fri, 07 Mar 2008) $
9// | last modifier : $Author: rub $
10// | revision      : $Revision: 2262 $
11// +-----------------------------------------------------------------------+
12// | This program is free software; you can redistribute it and/or modify  |
13// | it under the terms of the GNU General Public License as published by  |
14// | the Free Software Foundation                                          |
15// |                                                                       |
16// | This program is distributed in the hope that it will be useful, but   |
17// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
18// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
19// | General Public License for more details.                              |
20// |                                                                       |
21// | You should have received a copy of the GNU General Public License     |
22// | along with this program; if not, write to the Free Software           |
23// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
24// | USA.                                                                  |
25// +-----------------------------------------------------------------------+
26
27// +-----------------------------------------------------------------------+
28// |                               functions                               |
29// +-----------------------------------------------------------------------+
30
31
32/**
33 * Encodes a string using Q form if required (RFC2045)
34 * mail headers MUST contain only US-ASCII characters
35 */
36function encode_mime_header($str)
37{
38  $x = preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches);
39  if ($x==0)
40  {
41    return $str;
42  }
43  // Replace every high ascii, control =, ? and _ characters
44  $str = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e',
45                  "'='.sprintf('%02X', ord('\\1'))", $str);
46
47  // Replace every spaces to _ (more readable than =20)
48  $str = str_replace(" ", "_", $str);
49
50  global $lang_info;
51  return '=?'.get_pwg_charset().'?Q?'.$str.'?=';
52}
53
54/*
55 * Returns an array of mail configuration parameters :
56 *
57 * - mail_options: see $conf['mail_options']
58 * - send_bcc_mail_webmaster: see $conf['send_bcc_mail_webmaster']
59 * - email_webmaster: mail corresponding to $conf['webmaster_id']
60 * - formated_email_webmaster: the name of webmaster is $conf['gallery_title']
61 * - text_footer: PhpWebGallery and version
62 *
63 * @return array
64 */
65function get_mail_configuration()
66{
67  global $conf;
68
69  $conf_mail = array(
70    'mail_options' => $conf['mail_options'],
71    'send_bcc_mail_webmaster' => $conf['send_bcc_mail_webmaster'],
72    'default_email_format' => $conf['default_email_format'],
73    'use_smtp' => !empty($conf['smtp_host']),
74    'smtp_host' => $conf['smtp_host'],
75    'smtp_user' => $conf['smtp_user'],
76    'smtp_password' => $conf['smtp_password']
77    );
78
79  // we have webmaster id among user list, what's his email address ?
80  $conf_mail['email_webmaster'] = get_webmaster_mail_address();
81
82  // name of the webmaster is the title of the gallery
83  $conf_mail['formated_email_webmaster'] =
84    format_email($conf['gallery_title'], $conf_mail['email_webmaster']);
85
86  $conf_mail['boundary_key'] = generate_key(32);
87
88  return $conf_mail;
89}
90
91/**
92 * Returns an email address with an associated real name
93 *
94 * @param string name
95 * @param string email
96 */
97function format_email($name, $email)
98{
99  global $conf;
100
101  if ($conf['enabled_format_email'])
102  {
103    // Spring cleaning
104    $cvt_name = trim(preg_replace('#[\n\r]+#s', '', $name));
105    $cvt_email = trim(preg_replace('#[\n\r]+#s', '', $email));
106
107    if ($cvt_name!="")
108    {
109      $cvt_name = encode_mime_header(
110                '"'
111                .addcslashes($cvt_name,'"')
112                .'"');
113      $cvt_name .= ' ';
114    }
115
116    if (strpos($cvt_email, '<') === false)
117    {
118      return $cvt_name.'<'.$cvt_email.'>';
119    }
120    else
121    {
122      return $cvt_name.$cvt_email;
123    }
124  }
125  else
126  {
127    return $cvt_email;
128  }
129}
130
131/**
132 * Returns an completed array template/theme
133 * completed with get_default_template()
134 *
135 * @params:
136 *   - args: incompleted array of template/theme
137 *       o template: template to use [default get_default_template()]
138 *       o theme: template to use [default get_default_template()]
139 */
140function get_array_template_theme($args = array())
141{
142  global $conf;
143
144  $res = array();
145
146  if (empty($args['template']) or empty($args['theme']))
147  {
148    list($res['template'], $res['theme']) = explode('/', get_default_template());
149  }
150
151  if (!empty($args['template']))
152  {
153    $res['template'] = $args['template'];
154  }
155
156  if (!empty($args['theme']))
157  {
158    $res['theme'] = $args['theme'];
159  }
160
161  return $res;
162}
163
164/**
165 * Return an new mail template
166 *
167 * @params:
168 *   - email_format: mail format
169 *   - args: function params of mail function:
170 *       o template: template to use [default get_default_template()]
171 *       o theme: template to use [default get_default_template()]
172 */
173function get_mail_template($email_format, $args = array())
174{
175  $args = get_array_template_theme($args);
176
177  $mail_template = new Template(PHPWG_ROOT_PATH.'template/'.$args['template'], $args['theme']);
178  $mail_template->_old->set_rootdir(PHPWG_ROOT_PATH.'template/'.$args['template'].'/mail/'.$email_format);
179  $mail_template->smarty->template_dir = PHPWG_ROOT_PATH.'template/'.$args['template'].'/mail/'.$email_format;
180 
181  return $mail_template;
182}
183
184/**
185 * Return string email format (html or not)
186 *
187 * @param string format
188 */
189function get_str_email_format($is_html)
190{
191  return ($is_html ? 'text/html' : 'text/plain');
192}
193
194/*
195 * Switch language to param language
196 * All entries are push on language stack
197 *
198 * @param string language
199 */
200function switch_lang_to($language)
201{
202  global $switch_lang, $user, $lang, $lang_info;
203
204  if (count($switch_lang['stack']) == 0)
205  {
206    $prev_language = $user['language'];
207  }
208  else
209  {
210    $prev_language = end($switch_lang['stack']);
211  }
212
213  $switch_lang['stack'][] = $language;
214
215  if ($prev_language != $language)
216  {
217    if (!isset($switch_lang['language'][$prev_language]))
218    {
219      $switch_lang[$prev_language]['lang_info'] = $lang_info;
220      $switch_lang[$prev_language]['lang'] = $lang;
221    }
222
223    if (!isset($switch_lang['language'][$language]))
224    {
225      // Re-Init language arrays
226      $lang_info = array();
227      $lang  = array();
228
229      // language files
230      load_language('common.lang', '', $language);
231      // No test admin because script is checked admin (user selected no)
232      // Translations are in admin file too
233      load_language('admin.lang', '', $language);
234      trigger_action('loading_lang');
235      load_language('local.lang', '', $language);
236
237      $switch_lang[$language]['lang_info'] = $lang_info;
238      $switch_lang[$language]['lang'] = $lang;
239    }
240    else
241    {
242      $lang_info = $switch_lang[$language]['lang_info'];
243      $lang = $switch_lang[$language]['lang'];
244    }
245
246    $user['language'] = $language;
247  }
248}
249
250/*
251 * Switch back language pushed with switch_lang_to function
252 *
253 * @param: none
254 */
255function switch_lang_back()
256{
257  global $switch_lang, $user, $lang, $lang_info;
258
259  $last_language = array_pop($switch_lang['stack']);
260
261  if (count($switch_lang['stack']) > 0)
262  {
263    $language = end($switch_lang['stack']);
264  }
265  else
266  {
267    $language = $user['language'];
268  }
269
270  if ($last_language != $language)
271  {
272    if (!isset($switch_lang['language'][$language]))
273    {
274      $lang_info = $switch_lang[$language]['lang_info'];
275      $lang = $switch_lang[$language]['lang'];
276    }
277    $user['language'] = $language;
278  }
279}
280
281/**
282 * Returns email of all administrator
283 *
284 * @return string
285 */
286/*
287 * send en notification email to all administrators
288 * if a administrator is doing action,
289 * he's be removed to email list
290 *
291 * @param:
292 *   - keyargs_subject: mail subject on l10n_args format
293 *   - keyargs_content: mail content on l10n_args format
294 *
295 * @return boolean (Ok or not)
296 */
297function pwg_mail_notification_admins($keyargs_subject, $keyargs_content)
298{
299  // Check arguments
300  if 
301    (
302      empty($keyargs_subject) or
303      empty($keyargs_content)
304    )
305  {
306    return false;
307  }
308
309  global $conf, $user;
310  $return = true;
311
312  $admins = array();
313
314  $query = '
315select
316  U.'.$conf['user_fields']['username'].' as username,
317  U.'.$conf['user_fields']['email'].' as mail_address
318from
319  '.USERS_TABLE.' as U,
320  '.USER_INFOS_TABLE.' as I
321where
322  I.user_id =  U.'.$conf['user_fields']['id'].' and
323  I.status in (\'webmaster\',  \'admin\') and
324  I.adviser = \'false\' and
325  '.$conf['user_fields']['email'].' is not null and
326  I.user_id <> '.$user['id'].'
327order by
328  username
329';
330
331  $datas = pwg_query($query);
332  if (!empty($datas))
333  {
334    while ($admin = mysql_fetch_array($datas))
335    {
336      if (!empty($admin['mail_address']))
337      {
338        array_push($admins, format_email($admin['username'], $admin['mail_address']));
339      }
340    }
341  }
342
343  if (count($admins) > 0)
344  {
345    $keyargs_content_admin_info = array
346    (
347      get_l10n_args('Connected user: %s', $user['username']),
348      get_l10n_args('IP: %s', $_SERVER['REMOTE_ADDR']),
349      get_l10n_args('Browser: %s', $_SERVER['HTTP_USER_AGENT'])
350    );
351
352    switch_lang_to(get_default_language());
353
354    $return = pwg_mail
355    (
356      '',
357      array
358      (
359        'Bcc' => $admins,
360        'subject' => '['.$conf['gallery_title'].'] '.l10n_args($keyargs_subject),
361        'content' =>
362           l10n_args($keyargs_content)."\n\n"
363          .l10n_args($keyargs_content_admin_info)."\n",
364        'content_format' => 'text/plain'
365      )
366    ) and $return;
367
368    switch_lang_back();
369  }
370
371  return $return;
372}
373
374/*
375 * send en email to user's group
376 *
377 * @param:
378 *   - group_id: mail are sent to group with this Id
379 *   - email_format: mail format
380 *   - keyargs_subject: mail subject on l10n_args format
381 *   - dirname: short name of directory including template
382 *   - tpl_shortname: short template name without extension
383 *   - assign_vars: array used to assign_vars to mail template
384 *   - language_selected: send mail only to user with this selected language
385 *
386 * @return boolean (Ok or not)
387 */
388function pwg_mail_group(
389  $group_id, $email_format, $keyargs_subject,
390  $dirname, $tpl_shortname,
391  $assign_vars = array(), $language_selected = '')
392{
393  // Check arguments
394  if 
395    (
396      empty($group_id) or
397      empty($email_format) or
398      empty($keyargs_subject) or
399      empty($tpl_shortname)
400    )
401  {
402    return false;
403  }
404
405  global $conf;
406  $return = true;
407
408  $query = '
409SELECT
410  distinct language, template
411FROM
412  '.USER_GROUP_TABLE.' as ug
413  INNER JOIN '.USERS_TABLE.' as u  ON '.$conf['user_fields']['id'].' = ug.user_id
414  INNER JOIN '.USER_INFOS_TABLE.' as ui  ON ui.user_id = ug.user_id
415WHERE
416        '.$conf['user_fields']['email'].' IS NOT NULL
417    AND group_id = '.$group_id;
418
419  if (!empty($language_selected))
420  {
421    $query .= '
422    AND language = \''.$language_selected.'\'';
423  }
424
425    $query .= '
426;';
427
428  $result = pwg_query($query);
429
430  if (mysql_num_rows($result) > 0)
431  {
432    $list = array();
433    while ($row = mysql_fetch_array($result))
434    {
435      $row['template_theme'] = $row['template'];
436      list($row['template'], $row['theme']) = explode('/', $row['template_theme']);
437      $list[] = $row;
438    }
439
440    foreach ($list as $elem)
441    {
442      $query = '
443SELECT
444  u.'.$conf['user_fields']['username'].' as username,
445  u.'.$conf['user_fields']['email'].' as mail_address
446FROM
447  '.USER_GROUP_TABLE.' as ug
448  INNER JOIN '.USERS_TABLE.' as u  ON '.$conf['user_fields']['id'].' = ug.user_id
449  INNER JOIN '.USER_INFOS_TABLE.' as ui  ON ui.user_id = ug.user_id
450WHERE
451        '.$conf['user_fields']['email'].' IS NOT NULL
452    AND group_id = '.$group_id.'
453    AND language = \''.$elem['language'].'\'
454    AND template = \''.$elem['template_theme'].'\'
455;';
456
457      $result = pwg_query($query);
458
459      if (mysql_num_rows($result) > 0)
460      {
461        $Bcc = array();
462        while ($row = mysql_fetch_array($result))
463        {
464          if (!empty($row['mail_address']))
465          {
466            array_push($Bcc, format_email($row['username'], $row['mail_address']));
467          }
468        }
469
470        if (count($Bcc) > 0)
471        {
472          switch_lang_to($elem['language']);
473
474          $mail_template = get_mail_template($email_format, $elem);
475          $mail_template->set_filename($tpl_shortname,
476            (empty($dirname) ? '' : $dirname.'/').$tpl_shortname.'.tpl');
477
478          $mail_template->assign_vars(
479            trigger_event('mail_group_assign_vars', $assign_vars));
480
481          $return = pwg_mail
482          (
483            '',
484            array
485            (
486              'Bcc' => $Bcc,
487              'subject' => l10n_args($keyargs_subject),
488              'email_format' => $email_format,
489              'content' => $mail_template->parse($tpl_shortname, true),
490              'content_format' => $email_format,
491              'template' => $elem['template'],
492              'theme' => $elem['theme']
493            )
494          ) and $return;
495
496          switch_lang_back();
497        }
498      }
499    }
500  }
501
502  return $return;
503}
504
505/*
506 * sends an email, using PhpWebGallery specific informations
507 *
508 * @param:
509 *   - to: receiver(s) of the mail.
510 *   - args: function params of mail function:
511 *       o from: sender [default value webmaster email]
512 *       o Cc: array of carbon copy receivers of the mail. [default value empty]
513 *       o Bcc: array of blind carbon copy receivers of the mail. [default value empty]
514 *       o subject  [default value 'PhpWebGallery']
515 *       o content: content of mail    [default value '']
516 *       o content_format: format of mail content  [default value 'text/plain']
517 *       o email_format: global mail format  [default value $conf_mail['default_email_format']]
518 *       o template: template to use [default get_default_template()]
519 *       o theme: template to use [default get_default_template()]
520 *
521 * @return boolean (Ok or not)
522 */
523function pwg_mail($to, $args = array())
524{
525  global $conf, $conf_mail, $lang_info, $page;
526
527  if (empty($to) and empty($args['Cc']) and empty($args['Bcc']))
528  {
529    return true;
530  }
531
532  if (!isset($conf_mail))
533  {
534    $conf_mail = get_mail_configuration();
535  }
536
537  if (empty($args['email_format']))
538  {
539    $args['email_format'] = $conf_mail['default_email_format'];
540  }
541
542  // Compute root_path in order have complete path
543  if ($args['email_format'] == 'text/html')
544  {
545    set_make_full_url();
546  }
547
548  if (!empty($to))
549  {
550    $to = format_email('', $to);
551  }
552
553  if (empty($args['from']))
554  {
555    $args['from'] = $conf_mail['formated_email_webmaster'];
556  }
557  else
558  {
559    $args['from'] = format_email('', $args['from']);
560  }
561
562  if (empty($args['subject']))
563  {
564    $args['subject'] = 'PhpWebGallery';
565  }
566  // Spring cleaning
567  $cvt_subject = trim(preg_replace('#[\n\r]+#s', '', $args['subject']));
568  // Ascii convertion
569  $cvt_subject = encode_mime_header($cvt_subject);
570
571  if (!isset($args['content']))
572  {
573    $args['content'] = '';
574  }
575
576  if (empty($args['content_format']))
577  {
578    $args['content_format'] = 'text/plain';
579  }
580
581  if ($conf_mail['send_bcc_mail_webmaster'])
582  {
583    $args['Bcc'][] = $conf_mail['formated_email_webmaster'];
584  }
585
586  if (($args['content_format'] == 'text/html') and ($args['email_format'] == 'text/plain'))
587  {
588    // Todo find function to convert html text to plain text
589    return false;
590  }
591
592  $args = array_merge($args, get_array_template_theme($args));
593
594  $headers = 'From: '.$args['from']."\n";
595  $headers.= 'Reply-To: '.$args['from']."\n";
596  if (empty($to))
597  {
598    $headers.= 'To: undisclosed-recipients: ;'."\n";
599  }
600
601  if (!empty($args['Cc']))
602  {
603    $headers.= 'Cc: '.implode(',', $args['Cc'])."\n";
604  }
605
606  if (!empty($args['Bcc']))
607  {
608    $headers.= 'Bcc: '.implode(',', $args['Bcc'])."\n";
609  }
610
611  $headers.= 'Content-Type: multipart/alternative;'."\n";
612  $headers.= '  boundary="---='.$conf_mail['boundary_key'].'";'."\n";
613  $headers.= '  reply-type=original'."\n";
614  $headers.= 'MIME-Version: 1.0'."\n";
615  $headers.= 'X-Mailer: Piwigo Mailer'."\n";
616
617  $content = '';
618
619  // key compose of indexes witch allow ti cache mail data
620  $cache_key = $args['email_format'].'-'.$lang_info['code'].'-'.$args['template'].'-'.$args['theme'];
621
622  if (!isset($conf_mail[$cache_key]))
623  {
624    if (!isset($mail_template))
625    {
626      $mail_template = get_mail_template($args['email_format']);
627    }
628
629    $mail_template->set_filename('mail_header', 'header.tpl');
630    $mail_template->set_filename('mail_footer', 'footer.tpl');
631
632    $mail_template->assign_vars(
633      array(
634        //Header
635        'BOUNDARY_KEY' => $conf_mail['boundary_key'],
636        'CONTENT_TYPE' => $args['email_format'],
637        'CONTENT_ENCODING' => get_pwg_charset(),
638        'LANG' => $lang_info['code'],
639        'DIR' => $lang_info['direction'],
640
641        // Footer
642        'GALLERY_URL' =>
643          isset($page['gallery_url']) ?
644                $page['gallery_url'] : $conf['gallery_url'],
645        'GALLERY_TITLE' =>
646          isset($page['gallery_title']) ?
647                $page['gallery_title'] : $conf['gallery_title'],
648        'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
649        'PHPWG_URL' => PHPWG_URL,
650
651        'TITLE_MAIL' => urlencode(l10n('title_send_mail')),
652        'MAIL' => get_webmaster_mail_address()
653        ));
654
655    if ($args['email_format'] == 'text/html')
656    {
657      $old_root = $mail_template->root;
658
659      if (is_file($mail_template->root.'/global-mail-css.tpl'))
660      {
661        $mail_template->set_filename('global_mail_css', 'global-mail-css.tpl');
662        $mail_template->assign_var_from_handle('GLOBAL_MAIL_CSS', 'global_mail_css');
663      }
664
665      $mail_template->root = PHPWG_ROOT_PATH.'template/'.$args['template'].'/theme/'.$args['theme'];
666      if (is_file($mail_template->root.'/mail-css.tpl'))
667      {
668        $mail_template->set_filename('mail_css', 'mail-css.tpl');
669        $mail_template->assign_var_from_handle('MAIL_CSS', 'mail_css');
670      }
671
672      $mail_template->root = PHPWG_ROOT_PATH.'template-common';
673      if (is_file($mail_template->root.'/local-mail-css.tpl'))
674      {
675        $mail_template->set_filename('local_mail_css', 'local-mail-css.tpl');
676        $mail_template->assign_var_from_handle('LOCAL_MAIL_CSS', 'local_mail_css');
677      }
678
679      $mail_template->root = $old_root;
680    }
681
682    // what are displayed on the header of each mail ?
683    $conf_mail[$cache_key]['header'] =
684      $mail_template->parse('mail_header', true);
685
686    // what are displayed on the footer of each mail ?
687    $conf_mail[$cache_key]['footer'] =
688      $mail_template->parse('mail_footer', true);
689  }
690
691  // Header
692  $content.= $conf_mail[$cache_key]['header'];
693
694  // Content
695  if (($args['content_format'] == 'text/plain') and ($args['email_format'] == 'text/html'))
696  {
697    $content.= '<p>'.
698                nl2br(
699                  preg_replace("/(http:\/\/)([^\s,]*)/i",
700                               "<a href='$1$2'>$1$2</a>",
701                               htmlspecialchars($args['content']))).
702                '</p>';
703  }
704  else
705  {
706    $content.= $args['content'];
707  }
708
709  // Footer
710  $content.= $conf_mail[$cache_key]['footer'];
711
712  // Close boundary
713  $content.= "\n".'-----='.$conf_mail['boundary_key'].'--'."\n";
714
715   // Undo Compute root_path in order have complete path
716  if ($args['email_format'] == 'text/html')
717  {
718    unset_make_full_url();
719  }
720
721  return
722    trigger_event('send_mail',
723      false, /* Result */
724      trigger_event('send_mail_to', $to),
725      trigger_event('send_mail_subject', $cvt_subject),
726      trigger_event('send_mail_content', $content),
727      trigger_event('send_mail_headers', $headers),
728      $args
729    );
730}
731
732/*
733 * pwg sendmail
734 *
735 * @param:
736 *   - result of other sendmail
737 *   - to: Receiver or receiver(s) of the mail.
738 *   - subject  [default value 'PhpWebGallery']
739 *   - content: content of mail
740 *   - headers: headers of mail
741 *
742 * @return boolean (Ok or not)
743 */
744function pwg_send_mail($result, $to, $subject, $content, $headers)
745{
746 if (!$result)
747 {
748    global $conf_mail;
749
750    if ($conf_mail['use_smtp'])
751    {
752      include_once( PHPWG_ROOT_PATH.'include/class_smtp_mail.inc.php' );
753      $smtp_mail = new smtp_mail(
754        $conf_mail['smtp_host'], $conf_mail['smtp_user'], $conf_mail['smtp_password'],
755        $conf_mail['email_webmaster']);
756      return $smtp_mail->mail($to, $subject, $content, $headers);
757    }
758    else
759    {
760      if ($conf_mail['mail_options'])
761      {
762        $options = '-f '.$conf_mail['email_webmaster'];
763        return mail($to, $subject, $content, $headers, $options);
764      }
765      else
766      {
767        return mail($to, $subject, $content, $headers);
768      }
769    }
770 }
771}
772
773/*Testing block
774function pwg_send_mail_test($result, $to, $subject, $content, $headers, $args)
775{
776    global $user, $lang_info;
777    @mkdir(PHPWG_ROOT_PATH.'testmail');
778    $filename = PHPWG_ROOT_PATH.'testmail/mail.'.$user['username'].'.'.$lang_info['code'].'.'.$args['template'].'.'.$args['theme'];
779    if ($args['content_format'] == 'text/plain')
780    {
781      $filename .= '.txt';
782    }
783    else
784    {
785      $filename .= '.html';
786    }
787    $file = fopen($filename, 'w+');
788    fwrite($file, $to);
789    fwrite($file, $subject);
790    fwrite($file, $headers);
791    fwrite($file, $content);
792    fclose($file);
793    return true;
794}
795add_event_handler('send_mail', 'pwg_send_mail_test', 0, 6);*/
796
797
798add_event_handler('send_mail', 'pwg_send_mail', EVENT_HANDLER_PRIORITY_NEUTRAL, 5);
799trigger_action('functions_mail_included');
800
801?>
Note: See TracBrowser for help on using the repository browser.