PHP code example of elminson / emailtoftp

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

    

elminson / emailtoftp example snippets


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

    ]; 

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