integrate_outgoing_email hook not being passed recipients of the outgoing email

Started by dataspiller, December 12, 2016, 03:05:25 AM

Previous topic - Next topic

dataspiller

Don't know if this qualifies as a bug, or if the developers intended for this, but the integration hook integrate_outgoing_email is not getting the recipients of that email. One can act upon subject, message or preliminary headers.

This weekend I started researching what it would take to keep SMF from sending mail to a specific member group, wanting to make it easier for my admins to handle email bounce backs with out modifying the user account.

My efforts on using integrate_outgoing_email can be found here: http://www.simplemachines.org/community/index.php?topic=550482 which has lead to my conclusion.


I'm running SMF 2.0.12, but looking at the source code in github for 2.1, nothing has changed. I do have mods installed, but I have verified that in a clean install of SMF, the hook call hasn't changed.

The integrate_outgoing_email gets called in the Sub-Posts.php, sendmail function

if (in_array(false, call_integration_hook('integrate_outgoing_email', array(&$subject, &$message, &$headers)), true))
        return false;


to me, not knowing the mind of the developers, it looks like they forgot to add a &$to_array to the hook call, since that is the variable a few lines before that contains the recipient.

The wiki page on integration hooks says that the outgoing email hook provides access to the recipients which is why I started looking at it.


Seth


Advertisement: