CRM_Mailing_MailStore
in package
Tags
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
Methods
- 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
- 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
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 = 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
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