All Projects → nextras → mail-panel

nextras / mail-panel

Licence: other
Mail panel for Nette framework

Programming Languages

PHP
23972 projects - #3 most used programming language
Latte
28 projects

Projects that are alternatives of or similar to mail-panel

forms
[DEPRECATED] Form controls for Nette Framework
Stars: ✭ 50 (-27.54%)
Mutual labels:  nextras, nette-component
static-router
Simple static router for Nette Framework
Stars: ✭ 24 (-65.22%)
Mutual labels:  nextras, nette-component
ocaml-tracy
Bindings to the Tracy profiler
Stars: ✭ 21 (-69.57%)
Mutual labels:  tracy
tracy
Basecalling, alignment, assembly and deconvolution of Sanger Chromatogram trace files
Stars: ✭ 73 (+5.8%)
Mutual labels:  tracy
orm-demo-nette
ORM demo in Nette framework
Stars: ✭ 14 (-79.71%)
Mutual labels:  nextras
logging
💥 Universal logging support to Tracy / Nette Framework (@nette)
Stars: ✭ 18 (-73.91%)
Mutual labels:  tracy

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\Mailer
    		factory: Nextras\MailPanel\FileMailer(%tempDir%/mail-panel-mails)

Usage

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

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


	public function actionSendMail()
	{
		$mail = new Nette\Mail\Message();
		$mail->setFrom('[email protected]', 'John Doe');
		$mail->addTo('[email protected]');
		$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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].