PHP code example of vis / mail-templates

1. Go to this page and download the library: Download vis/mail-templates 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/ */

    

vis / mail-templates example snippets


  'Vis\MailTemplates\MailTemplatesServiceProvider',

 	   array(
          'title' => 'Почта',
          'icon'  => 'envelope-o',
          'check' => function() {
              return true;
          },
          'submenu' => array(
              array(
                  'title' => "Шаблоны писем",
                  'link'  => '/emails/letter_template',
                  'check' => function() {
                      return true;
                  }
              ),
              array(
                  'title' => "Письма",
                  'link'  => '/emails/mailer',
                  'check' => function() {
                      return true;
                  }
              ),
              array(
                  'title' => "Настройки",
                  'link'  => '/emails/settings',
                  'check' => function() {
                      return true;
                  }
              ),
          )
      ),

    use Vis\MailTemplates\MailT;

    $mail = new MailT("alias шаблона письма", array(
        "fio" => "Вася",
        "phone" => "097 000 00 00"
    ));
    $mail->to = "email";
    $mail->attach = Input::file('file_name'); //если нужно много файлов переслать, то оформлять как массив : array(Input::file('file_name'), Input::file('file_name'))

    $mail->send();
json
   php artisan migrate --package=vis/mail-templates
json
   php artisan asset:publish vis/mail-templates