89 if (isset($params[
'preSendCallback']) &&
90 is_callable($params[
'preSendCallback'])) {
91 $this->_preSendCallback = $params[
'preSendCallback'];
94 if (isset($params[
'postSendCallback']) &&
95 is_callable($params[
'postSendCallback'])) {
96 $this->_postSendCallback = $params[
'postSendCallback'];
125 function send($recipients, $headers, $body)
127 if ($this->_preSendCallback) {
128 call_user_func_array($this->_preSendCallback,
129 array(&$this, $recipients, $headers, $body));
132 $entry = array(
'recipients' => $recipients,
'headers' => $headers,
'body' => $body);
133 $this->sentMessages[] = $entry;
135 if ($this->_postSendCallback) {
136 call_user_func_array($this->_postSendCallback,
137 array(&$this, $recipients, $headers, $body));