Skip to content

A panel for Tracy Debugger showing html and plain output of Atk14 ApplicationMailer

License

Notifications You must be signed in to change notification settings

atk14/MailPanel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MailPanel

A panel for Tracy Debugger that show output of both html and plaintext versions of emails sent by Atk14 ApplicationMailer.

Basic usage

$bar = Tracy\Debugger::getBar();
$bar->addPanel(new MailPanel($this->mailer));

Usage in an ATK14 application (built upon Atk14Skelet)

First enable Tracy Debugger.

// file: lib/load.php
if(
  !TEST &&
  !$HTTP_REQUEST->xhr() &&
  php_sapi_name()!="cli" // we do not want Tracy in cli
){
  Tracy\Debugger::enable(PRODUCTION, __DIR__ . '/../log/');
}

Add MailPanel panel to Tracy in _application_after_filter().

// file: app/controllers/application_base.php
function _application_after_filter(){
  if(!TEST){
    $bar = Tracy\Debugger::getBar();
    $bar->addPanel(new MailPanel($this->mailer));
  }
}

Installation

Just use the Composer:

$ cd path/to/your/atk14/project/
$ composer require atk14/mail-panel

About

A panel for Tracy Debugger showing html and plain output of Atk14 ApplicationMailer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages