CRM_Mailing_MailStore_Pop3
extends CRM_Mailing_MailStore
in package
Class CRM_Mailing_MailStore_Pop3
Table of Contents
Properties
- $_debug : bool
- Flag to decide whether to print debug messages
- $_transport : ezcMailImapTransport|ezcMailMboxTransport|ezcMailPop3Transport|null
- Holds the underlying mailbox transport implementation
- $_ignored : string
- Path to a local directory to store ignored emails
- $_processed : string
- Path to a local directory to store ignored emails
Methods
- __construct() : CRM_Mailing_MailStore_Pop3
- Connect to the supplied POP3 server and make sure the two mail dirs exist
- allMails() : array<string|int, mixed>
- Return all emails in the mail store.
- expunge() : mixed
- Expunge the messages marked for deletion; stub function to be redefined by IMAP store.
- fetchNext() : array<string|int, mixed>
- Return the next X messages from the mail store.
- getStore() : CRM_Mailing_MailStore
- Return the proper mail store implementation, based on config settings.
- maildir() : string
- Point to (and create if needed) a local Maildir for storing retrieved mail
- markIgnored() : mixed
- Fetch the specified message to the local ignore folder.
- markProcessed() : mixed
- Fetch the specified message to the local processed folder.
- getProtocolDefaults() : array<string|int, mixed>
Properties
$_debug
Flag to decide whether to print debug messages
public
bool
$_debug
= \FALSE
$_transport
Holds the underlying mailbox transport implementation
protected
ezcMailImapTransport|ezcMailMboxTransport|ezcMailPop3Transport|null
$_transport
$_ignored
Path to a local directory to store ignored emails
private
string
$_ignored
$_processed
Path to a local directory to store ignored emails
private
string
$_processed
Methods
__construct()
Connect to the supplied POP3 server and make sure the two mail dirs exist
public
__construct(string $host, string $username, string $password[, bool $ssl = TRUE ]) : CRM_Mailing_MailStore_Pop3
Parameters
- $host : string
-
Host to connect to.
- $username : string
-
Authentication username.
- $password : string
-
Authentication password.
- $ssl : bool = TRUE
-
Whether to use POP3 or POP3S.
Return values
CRM_Mailing_MailStore_Pop3allMails()
Return all emails in the mail store.
public
allMails() : array<string|int, mixed>
Return values
array<string|int, mixed> —array of ezcMail objects
expunge()
Expunge the messages marked for deletion; stub function to be redefined by IMAP store.
public
expunge() : mixed
fetchNext()
Return the next X messages from the mail store.
public
fetchNext([int $count = 1 ]) : array<string|int, mixed>
Parameters
- $count : int = 1
-
Number of messages to fetch (0 to fetch all).
Return values
array<string|int, mixed> —array of ezcMail objects
getStore()
Return the proper mail store implementation, based on config settings.
public
static getStore([string $name = NULL ]) : CRM_Mailing_MailStore
Parameters
- $name : string = NULL
-
Name of the settings set from civimail_mail_settings to use (null for default).
Tags
Return values
CRM_Mailing_MailStore —mail store implementation for processing CiviMail-bound emails
maildir()
Point to (and create if needed) a local Maildir for storing retrieved mail
public
maildir(string $name) : string
Parameters
- $name : string
-
Name of the Maildir.
Tags
Return values
string —path to the Maildir's cur directory
markIgnored()
Fetch the specified message to the local ignore folder.
public
markIgnored(int $nr) : mixed
Parameters
- $nr : int
-
Number of the message to fetch.
markProcessed()
Fetch the specified message to the local processed folder.
public
markProcessed(int $nr) : mixed
Parameters
- $nr : int
-
Number of the message to fetch.
getProtocolDefaults()
private
static getProtocolDefaults(string $protocol) : array<string|int, mixed>
Parameters
- $protocol : string
-
Ex: 'IMAP', 'Maildir'
Return values
array<string|int, mixed> —List of properties to merge into the $mailSettings. The most important property is 'factory' with signature:
function($mailSettings): CRM_Mailing_MailStore