From 1986aa9e32d0631a86ddb9a5d6883c628b0d3d3f Mon Sep 17 00:00:00 2001
From: Chris Smith <chris@jalakai.co.uk>
Date: Sun, 30 Sep 2007 03:47:28 +0200
Subject: [PATCH] Add MAIL_MESSAGE_SEND event (resolution of FS#1007)

Wrapper around DokuWiki's mail_send() function.
For full details refer http://wiki.splitbrain.org/wiki:events_list#mail_message_send

Also see discussion at http://www.freelists.org/archives/dokuwiki/09-2007/msg00077.html

darcs-hash:20070930014728-d26fc-ecdc7df22f35d1c04e8d22da332426df8a85da5b.gz
---
 inc/mail.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/inc/mail.php b/inc/mail.php
index 9a2ae96c7..b677c2b38 100644
--- a/inc/mail.php
+++ b/inc/mail.php
@@ -34,6 +34,11 @@
  * @see    mail()
  */
 function mail_send($to, $subject, $body, $from='', $cc='', $bcc='', $headers=null, $params=null){
+  $message = compact('to','subject','body','from','cc','bcc','headers','params');
+  trigger_event('MAIL_MESSAGE_SEND',$message,'_mail_send');
+}
+
+function _mail_send($to, $subject, $body, $from='', $cc='', $bcc='', $headers=null, $params=null){
   if(defined('MAILHEADER_ASCIIONLY')){
     $subject = utf8_deaccent($subject);
     $subject = utf8_strip($subject);
-- 
GitLab