Documentation

CRM_Mailing_MailStore_Maildir extends CRM_Mailing_MailStore
in package

Class CRM_Mailing_MailStore_Maildir

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
$_dir  : string
Directory to operate upon.
$_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_Maildir
Connect to the supplied dir 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

$_dir

Directory to operate upon.

private string $_dir

$_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

allMails()

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 = 0 ]) : array<string|int, mixed>

FIXME: in CiviCRM 2.2 this always returns all the emails

Parameters
$count : int = 0

Number of messages to fetch FIXME: ignored in CiviCRM 2.2 (assumed to be 0, i.e., 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
throws
Exception
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
throws
Exception
Return values
string

path to the Maildir's cur directory

markIgnored()

Fetch the specified message to the local ignore folder.

public markIgnored(int $file) : mixed
Parameters
$file : int

File location of the message to fetch.

Tags
throws
Exception

markProcessed()

Fetch the specified message to the local processed folder.

public markProcessed(int $file) : mixed
Parameters
$file : int

File location of the message to fetch.

Tags
throws
Exception

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


        
On this page

Search results