PHP code example of eseperio / yii2-email-accounts-manager

1. Go to this page and download the library: Download eseperio/yii2-email-accounts-manager 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/ */

    

eseperio / yii2-email-accounts-manager example snippets


return [
    'controllerMap' => [
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationPath' => [
                '@vendor/eseperio/yii2-email-accounts-manager/src/migrations',
            ],
        ],
    ],
];

return [
    'modules' => [
        'email-manager' =>[
            'class'=> \eseperio\emailManager\EmailManagerModule::class,      
            'showImapSettings' => false, // change if you need imap settings to be shown,
            // 'mailer'=> 'mailer',
            // 'transport => ['class' => 'Swift_SmtpTransport'],
        ],
       
    ]
]

use eseperio\emailmanager\models\EmailAccount;

$account = EmailAccount::findOne(1)->compose('test', ['message' => 'Hello world!'])->setTo('[email protected]')->send();