PHP code example of jandrabek / nette-mailpanel

1. Go to this page and download the library: Download jandrabek/nette-mailpanel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jandrabek / nette-mailpanel example snippets


class ExamplePresenter extends BasePresenter {

	private $mailer;

	public function injectMailer(Nette\Mail\IMailer $mailer) {
		$this->mailer = $mailer;
	}

	public function renderDefault() {
		$mail = new Nette\Mail\Message;
		$mail->setFrom('[email protected]');
		$mail->addTo('[email protected]');
		$mail->setSubject('Subject');
		$mail->setBody('Message body');

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

}