This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Store HTTP headers for testing them instead of sending them

The header proxy factory class provides a header proxy object with which HTTP headers can be sent like in PHP’s header() function or collected for testing.

Add real headers

To a add real header, get the singleton header proxy factory instance first:


In non-test mode, addHeader() behaves similar to the PHP function header().

Testing the headers

For testing, the header proxy factory’s test mode needs to be enabled. Then the header proxy instance returned by the factory is another object which collects the headers that were meant to be sent. This data can be accessed with getter functions.

The following lines show what a test might look like:

public function setUp() {
  $this->fixture = new classToTest();

public function tearDown() {

public function testHeaderWasSentWhenTheUserHasNoAccess() {
          'Status: 403 Forbidden',

If necessary, the instance can return all headers that were added since the last clean-up:


Send HTML mails

To send e-mails in HTML Format simply add the HTML body to the mails by usingtx_oelib_mailerFactory::getInstance()->getMailer()->setHTMLM essage($htmlMessage)

Add CSS to these HTML e-mails

To add CSS to these HTML e-mails simply user the addCssFile function of the oelib mailer.