Extension Hooks

email_module_send_email_end

Hook Added in Version:

EE 1.5.1

Hook File Location:

mod.email.php

Hook Description:

After emails are sent, do some additional processing

Hook Parameters

  • $subject - the sanitized and parsed subject of the email
  • $message - the sanitized and parsed body of the email
  • $approved_tos - array of email addresses sent from the form's "to" field
  • $approved_recipients - array of email addresses specified in the tag as recipients

Hook Returns Data?

No

Appearance of Hook in the Code

if (isset($EXT->extensions['email_module_send_email_end']))
{
 $edata = $EXT->call_extension('email_module_send_email_end', $subject, $message, $approved_tos, $approved_recipients);
 if ($EXT->end_script === TRUE) return;
}

Additional Notes

The $_POST array contains valuable information when using this hook, in addition to the unprocessed form fields, such as the URI that was being browsed when the email was sent.