MailReader.php
1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?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 );
}