PHP code example of nanuc / frontend-mail
1. Go to this page and download the library: Download nanuc/frontend-mail 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/ */
nanuc / frontend-mail example snippets
class SomeMail extends Mailable
{
public function build()
{
return $this->view('mails.some-mail')
->withSwiftMessage(function ($message){
$message->getHeaders()->addTextHeader(
'Frontend-Mail-Id', $this->user->id
);
});
}
}