elminson/emailtoftp

Email to FPT

v1.0.4 2018-08-02 22:16 UTC

This package is auto-updated.

Last update: 2024-11-06 08:11:41 UTC


README

Upload files to ftp using email

Server need lib imap_open enable ##Installation

Untill Big o’ 2.0 is ready (ssilence/php-imap-client), use the following command to install PHP-imap-library:

composer require ssilence/php-imap-client dev-master

After install ssilence/php-imap-client dev-master

composer create-project elminson/emailtoftp

or

composer require elminson/emailtoftp

Configuration

 $config = [
        'validCredential' => 'valid@gmail.net',
        'smtp' =>
            [
                'server' => 'mail.gmail.net',
                'user' => 'emailtoftp@gmail.net',
                'password' => 'securepassword'
            ],
        'ftp' =>
            [
                'upload_folder' => 'aqui/',
                'host' => 'ftpdomain.net',
                'userftp' => 'ftpuser',
                'passwordftp' => 'ftppasswrod'
            ]

    ]; 

##Usage

$email = new Emailreader($config);
echo "Total Files Uploaded : ".$email->total_files;

#Dependencies

"ssilence/php-imap-client": "dev-master",
"nicolab/php-ftp-client": "^1.4"