mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-21 08:00:46 +01:00
[ticket/14852] Add core event to modify email headers
PHPBB3-14852
This commit is contained in:
parent
85898d3d2c
commit
6984f17f62
@ -438,7 +438,7 @@ class messenger
|
||||
*/
|
||||
function build_header($to, $cc, $bcc)
|
||||
{
|
||||
global $config;
|
||||
global $config, $phpbb_dispatcher;
|
||||
|
||||
// We could use keys here, but we won't do this for 3.0.x to retain backwards compatibility
|
||||
$headers = array();
|
||||
@ -470,6 +470,16 @@ class messenger
|
||||
$headers[] = 'X-MimeOLE: phpBB3';
|
||||
$headers[] = 'X-phpBB-Origin: phpbb://' . str_replace(array('http://', 'https://'), array('', ''), generate_board_url());
|
||||
|
||||
/**
|
||||
* Event to modify email header entries
|
||||
*
|
||||
* @event core.modify_email_headers
|
||||
* @var array headers Array containing email header entries
|
||||
* @since 3.1.11-RC1
|
||||
*/
|
||||
$vars = array('headers');
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_email_headers', compact($vars)));
|
||||
|
||||
if (sizeof($this->extra_headers))
|
||||
{
|
||||
$headers = array_merge($headers, $this->extra_headers);
|
||||
|
Loading…
x
Reference in New Issue
Block a user