PHP code example of nextras / mail-panel
1. Go to this page and download the library: Download nextras/mail-panel 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/ */
nextras / mail-panel example snippets
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);
}
}