Skip to content

Latest commit

 

History

History
57 lines (32 loc) · 1022 Bytes

README.md

File metadata and controls

57 lines (32 loc) · 1022 Bytes

"# yii2-archi"

тестовое расширение

mail parser

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist archiflash/yii2-archi "*"

or add

"archiflash/yii2-archi": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

use archiflash\archi\MailParser;


$db_credentials = [];
$db_credentials["dsn"] = 'mysql:dbname=project;host=localhost';
$db_credentials["username"] = 'username';
$db_credentials["password"] = 'password';

$mail_credentials = [];
$mail_credentials["imapPath"] = '{imap.yandex.ru:993/ssl/novalidate-cert/readonly}';
$mail_credentials["username"] = 'username';
$mail_credentials["password"] = 'password';


$parser = new MailParser($db_credentials, $mail_credentials);

$result = $parser->parse(); // returns string