PHP code example of omelya / yii2-phpmailer

1. Go to this page and download the library: Download omelya/yii2-phpmailer 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/ */

    

omelya / yii2-phpmailer example snippets


 $config = [
     'components' => [
        'mailer' => [
            'class' => dicr\phpmailer\PHPMailerMailer::class,
            
            // конфиг \PHPMailer\PHPMailer\PHPMailer
            'transportConfig' => [
                'CharSet' => CHARSET
            ],
            
            // конфиг сообщения по-умолчанию
            'messageConfig' => [
                'from' => FROM
            ]
        ]
    ]
];