Statistics
40331
55
1
92d
Badges
Tags
tracy
Dependencies

Nextras Mail Panel

Downloads this Month Stable version

Nextras Mail Panel is an extension for Nette Framework which captures sent e-mails in development mode and shows them in Tracy bar.

Screenshot

Installation

  1. Install library via composer:

    composer require nextras/mail-panel
  2. Update your local configuration (e.g. config.local.neon) to register Mail Panel to Tracy
    and to change default mailer to Nextras\MailPanel\FileMailer.

    tracy:
    	bar:
    		- Nextras\MailPanel\MailPanel(%tempDir%/mail-panel-latte)
    
    services:
    	nette.mailer:
    		class: Nette\Mail\IMailer
    		factory: Nextras\MailPanel\FileMailer(%tempDir%/mail-panel-mails)

Usage

Messages has to be sent by injected instance of Nette\Mail\IMailer.

class ExamplePresenter extends BasePresenter
{
	/** @var Nette\Mail\IMailer @inject */
	public $mailer;


	public function actionSendMail()
	{
		$mail = new Nette\Mail\Message();
		$mail->setFrom('john.doe@example.com', 'John Doe');
		$mail->addTo('jack@example.com');
		$mail->setSubject('Order Confirmation');
		$mail->setHtmlBody('Hello Jack,<br>Your order has been accepted.');

		$this->mailer->send($mail);
	}
}

License

Based on MailPanel by Jan Drábek.

New BSD License. See full license.

  • v2.3.0 Nextras Mail Panel 2.3.0

    • redesigned panel
    • added support for viewing attachments (thx @MartkCz)
    • added support for viewing mail source code (thx @repli2dev)
    • added support for viewing mail in new window (thx @repli2dev)
    • added plain text preview as alternative to HTML preview
    • added detection of optimal HTML preview height
    • previews are collapsed by default and their visibility state can be toggled
    • replaced PNG icon with SVG (thx @irkallacz)
    • increased default message count to 20
    • changed panel width in window-mode to fluid
    • deprecated SessionMailer in favor of FilesMailer
    • fixed baseUrl detection
    • fixed viewing of plain text-only mails with attachments (thx @repli2dev)
    • fixed possible redirect loop
    • lots of internal refactoring

  • v2.3.0-beta1 Mail Panel 2.3.0 beta

    • redesigned panel
    • added support for viewing attachments (thx @MartkCz)
    • added support for viewing mail source code (thx @repli2dev)
    • added support for viewing mail in new window (thx @repli2dev)
    • added plain text preview as alternative to HTML preview
    • added detection of optimal HTML preview height
    • previews are collapsed by default and their visibility state can be toggled
    • replaced PNG icon with SVG (thx @irkallacz)
    • deprecated SessionMailer in favor of FilesMailer
    • fixed baseUrl detection
    • fixed viewing of plain text-only mails with attachments (thx @repli2dev)
    • lots of internal refactoring

Is this addon outdated? Did you find an issue? Please report it.

Componette Componette admin@componette.com