Prev |  | Next

### 3.12.2. send_mail

This hook can be used for implementing an alternative mail sending system. The hook should return true if Phorum should still send the mails. If you do not want to have Phorum send the mails also, return false.
The SMTP module is a good example of using this hook to replace Phorum's default mail sending system.

Call time:

In the file `email_functions.php` in `phorum_email_user()`, right before email is sent using mail().

Hook input:

Array with mail data (read-only) containing:

- `addresses`, an array of e-mail addresses
- `from`, the sender address
- `subject`, the mail subject
- `body`, the mail body
- `bcc`, whether to use Bcc for mailing multiple recipients

Hook output:

true or false - see description.

Prev | Up | Next
| Home |