Skip to content
Snippets Groups Projects
Commit 348e3c03 authored by Chris Smith's avatar Chris Smith
Browse files

corrections for earlier MAIL_MESSAGE_SEND patch :)

darcs-hash:20070930124603-d26fc-599122159a088c92dbbe3ed3fb10dc376d40c54e.gz
parent 66d29756
No related branches found
No related tags found
No related merge requests found
......@@ -34,11 +34,27 @@
* @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');
return trigger_event('MAIL_MESSAGE_SEND',$message,'_mail_send_action');
}
function _mail_send($to, $subject, $body, $from='', $cc='', $bcc='', $headers=null, $params=null){
function _mail_send_action($data) {
// retrieve parameters from event data, $to, $subject, $body, $from, $cc, $bcc, $headers, $params
$to = $data['to'];
$subject = $data['subject'];
$body = $data['body'];
// add robustness in case plugin removes any of these optional values
$from = isset($data['from']) ? $data['from'] : '';
$cc = isset($data['cc']) ? $data['cc'] : '';
$bcc = isset($data['bcc']) ? $data['bcc'] : '';
$headers = isset($data['headers']) ? $data['headers'] : null;
$params = isset($data['params']) ? $data['params'] : null;
// end additional code to support event ... original mail_send() code from here
if(defined('MAILHEADER_ASCIIONLY')){
$subject = utf8_deaccent($subject);
$subject = utf8_strip($subject);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment