MailReader.php 1.02 KB
<?php
/**
 * Created by PhpStorm.
 * User: Tsurkanov
 * Date: 02.11.2015
 * Time: 16:47
 */

namespace common\components\mail;


abstract class  MailReader {

    public $connection;
    protected $hostname;
    protected $username;
    protected $password;

    /* get information specific to this email */
//                $overview = imap_fetch_overview($inbox, $email_number, 0);
//                $message = imap_fetchbody($inbox, $email_number, 2);

    function __construct( $hostname, $username, $password )
    {
        $this->hostname = $hostname;
        $this->username = $username;
        $this->password = $password;
    }

    /**
     * @return mixed
     */
    public function getHostname()
    {
        return $this->hostname;
    }

    public abstract function getListMailboxes();

    public abstract function getEmails( $flag );

    public abstract function getEmailBody( $email_number, $section );

    public abstract function getCurrentEmailStructure( $email );

    public abstract function reOpen( $hostname );



}