Addon for catching e-mails in Nette FW to filesystem and showing it in the Debug Bar.

Installs: 268

Dependents: 0

Stars: 4

Watchers: 4

Forks: 2

Open Issues: 1

0.3.2 2015-05-12 11:52 UTC


E-mails catching addon for Nette Framework. Emails are stored into files and shown in Tracy bar.

!WARNING! - After setting up this addon, all e-mails are not sent, but ONLY stored on filesystem and shown in Tracy bar.


Killer features

  • Simple instalation
  • Extensive configuration options
  • Full access to headers
  • Plain text and HTML output
  • Possibility to download the attachments
  • Parser caching


Add package to your project by the Composer:

composer require rm/filemailer

or download addon manually from GitHub and unpack it in place indexed by RobotLoader.


The addon consists of two parts. The first one is the FileMailer which replaces the IMailer service and stores e-mails to filesystem. The second one is the MailPanel which is the Tracy bar panel and shows e-mails stored by FileMailer.

Default options are used in following examples.

Setup by extension

Register new compiler extension in config.neon and optionally configure:

    mailer: RM\MailPanel\DI\MailPanelExtension

    newMessageTime: '-2 seconds'    # how long consider email as new
    show: [subject, from, to]       # which headers show in overview
    autoremove: '-5 seconds'        # how old emails are purged
    hideEmpty: yes                  # hide bar icon when no emails?
    debugger: yes                   # enable Tracy bar
    tempDir: '%tempDir/mails'       # change e-mails store directory

Manual setup

Replace the Nette's default IMailer service and register Tracy bar panel:

    mail.mailer: RM\FileMailer(%tempDir%/mails)

        class: RM\MailPanel
        autowired: no
            - setFileMailer(@mail.mailer)   # required
            - $newMessageTime('-5 seconds')
            - $show([subject, from, to])
            - $autoremove('-5 seconds')
            - $hideEmpty(yes)

        - @mailerPanel