Project

General

Profile

Feature #62960 » initialize-mailer-hook.patch

Same as before with fixed indentation - Mathias Brodala, 2014-11-14 16:59

View differences:

typo3/sysext/core/Classes/Mail/Mailer.php
// Make sure Swift's auto-loader is registered
require_once PATH_typo3 . 'contrib/swiftmailer/lib/swift_required.php';
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Adapter for Swift_Mailer to be used by TYPO3 extensions.
*
......
throw new \TYPO3\CMS\Core\Exception($e->getMessage(), 1291068569);
}
}
parent::__construct($this->transport);
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['mail']['initializeMailer'])) {
$parameters = array();
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['mail']['initializeMailer'] as $hookFunction) {
GeneralUtility::callUserFunction($hookFunction, $parameters, $this);
}
}
}
/**
(2-2/3)