Download the PHP package eseperio/yii2-email-accounts-manager without Composer
On this page you can find all versions of the php package eseperio/yii2-email-accounts-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eseperio/yii2-email-accounts-manager
More information about eseperio/yii2-email-accounts-manager
Files in eseperio/yii2-email-accounts-manager
Package yii2-email-accounts-manager
Short Description Use and manage multiple email accounts in a single yii2-project
License MIT
Informations about the package yii2-email-accounts-manager
yii2-email-accounts-manager
Use and manage different email accounts under the same project. Features methods to live test the configuration and ensure it is correct.
Features
- Manage multiple email accounts
- SMTP + IMAP configuration
- SMTP + IMAP live test
- Autodiscover SMTP and IMAP settings (when available)
Installation
The preferred way to install this extension is through composer.
composer require eseperio/yii2-email-accounts-manager
ext-simplexml
is required for autodiscover feature, but has not been required within composer.json so you can use the
library without autodiscover
Add the migration path to your console config:
Add the module to your app modules configuration
Usage
Important: This module will replace the current transport for the mailer defined and it does not restore to previous value.
If you want to prevent this use a different mailer component for this module.
This module includes methods for checking whether the email account is valid and for sending emails using the given configuration.
The EmailAccount model includes useful methods, like getTransport()
and setAsMainTransport()
.
getTransport()
returns the transport configuration based on configuration defined within module and the account
itself.
setAsMainTransport()
will set the transport configuration for the mailer component defined in the module configuration
and will return the mailer instance.
compose($view='',$params=[])
will return a new message instance preconfigured with the transport configuration for the
account and also setFrom
defined with the account address.