PHP code example of appaydin / pd-mailer
1. Go to this page and download the library: Download appaydin/pd-mailer 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/ */
appaydin / pd-mailer example snippets
// config/bundles.php
return [
//...
Pd\MailerBundle\PdMailerBundle::class => ['all' => true]
];
// Create Message
$email = new Email();
$email
->from('[email protected]')
->to('[email protected]')
->subject('Subject')
->html([
'firstname' => 'Ramazan', 'lastname' => 'APAYDIN'
]) // Data to be used in the template. - Required
->getHeaders()->addTextHeader('template', 'customTemplateID'); // Required
// Send Mail
$this->get('mailer')->send($email);
yaml
logger_active: true
template_active: true
list_count: 30
active_language: ['tr', 'en']