Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
Mail

Functions

 __destruct ()
 Destructor implementation to ensure that we disconnect from any potentially-alive persistent SMTP connections.
 
 __construct ($address=null)
 Constructor.
 
 __construct ($data, $limit=null)
 Constructor.
 
 __construct (array $params=array())
 Constructor.
 
 __get ($name)
 
 __serialize ()
 
 __set ($name, $value)
 
 __toString ()
 String representation of the object.
 
 __unserialize (array $data)
 
 _error ($id, $info=array())
 Format error message.
 
 _error ($text, $error, $e_code)
 Build a standardized string describing the current SMTP error.
 
 _getMx ($host)
 Recieve MX records for a host.
 
 _iteratorFilter ($ob)
 
 _loadNetDns ()
 Initialize Net_DNS2_Resolver.
 
 _normalize ($obs)
 Normalize objects to add to list.
 
 _writeAddress ( $opts)
 Class-specific implementation of writeAddress().
 
 add ($obs)
 Add objects to the container.
 
 addServiceExtensionParameter ($keyword, $value=null)
 Add parameter associated with a SMTP service extension.
 
 contains ($address)
 Does this list contain the given e-mail address?
 
 count ()
 Index count.
 
 current ()
 
 disconnect ()
 Disconnect and destroy the current SMTP connection.
 
 first ()
 Convenience method to return the first element in a list.
 
 getSMTPObject ()
 Connect to the SMTP server by instantiating a Net_SMTP object.
 
foreach( $obs as $val) groupCount ()
 Group count.
 
 key ()
 
 match ( $ob)
 Compare this object against other data.
 
 matchDomain ($domain)
 Do a case-insensitive match on the address for a given domain.
 
 matchInsensitive ($ob)
 Do a case-insensitive match on the address.
 
 next ()
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 parse ($value)
 Parse an identification header.
 
 remove ($obs)
 Remove addresses from the container.
 
 rewind ()
 
 seek ($position)
 
 send ($recipients, array $headers, $body)
 
 serialize ()
 
 setIteratorFilter ($mask=0, $filter=null)
 Set the Iterator filter.
 
 unique ()
 Removes duplicate addresses from list.
 
 unserialize ($data)
 
 valid ()
 
 writeAddress ($opts=array())
 Write an address given information in this part.
 

Variables

array $_data = array()
 List data.
 
array $_errorCode
 Internal error codes.
 
array $_extparams = array()
 The list of service extension parameters to pass to the Net_SMTP mailFrom() command.
 
array $_filter = array()
 Current Iterator filter.
 
string $_groupname = 'Group'
 Group name (MIME decoded).
 
string $_host = null
 Hostname of the address.
 
array $_parsed = array()
 Parsed data.
 
static string $_pearDirectory = '@data_dir@'
 The absolute PEAR path to the translations for the default gettext handler.
 
string $_personal = null
 Personal part of the address.
 
callback $_postSendCallback
 Callback after sending mai.
 
callback $_preSendCallback
 Callback before sending mail.
 
array $_ptr
 Current Iterator pointer.
 
Net_DNS2_Resolver $_resolver
 Net_DNS2_Resolver object.
 
string $_sendmailPath = '/usr/sbin/sendmail'
 The location of the sendmail or sendmail wrapper binary on the filesystem.
 
Net_SMTP $_smtp = null
 SMTP connection object.
 
Horde_Smtp $_smtp = null
 SMTP object.
 
string $greeting = null
 The SMTP greeting.
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE **category Horde *copyright Horde LLC *copyright Phil Kernick *license array $headers
 
string $mailbox = null
 Local-part of the address (UTF-8).
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE **category Horde *copyright Horde LLC *license $params
 
string $queuedAs = null
 The SMTP queued response.
 
catch(Horde_Smtp_Exception $e) return $this _smtp
 
const BASE_ELEMENTS = 2
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN CONTRACT
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN CONTRACT
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN CONTRACT
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN CONTRACT
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN CONTRACT
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN CONTRACT
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN CONTRACT
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN CONTRACT
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN CONTRACT
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN CONTRACT
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see Countable
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see Countable
 
LOSS OF * DATA
 
LOSS OF * DATA
 
LOSS OF * DATA
 
LOSS OF * DATA
 
LOSS OF * DATA
 
LOSS OF * DATA
 
LOSS OF * DATA
 
LOSS OF * DATA
 
LOSS OF * DATA
 
LOSS OF * DATA
 
const ERROR_AUTH = 10002
 
const ERROR_CONNECT = 10001
 
const ERROR_DATA = 10006
 
const ERROR_FROM = 10003
 
const ERROR_RECIPIENT = 10005
 
const ERROR_SENDER = 10004
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE **category Horde *copyright Horde LLC *license http
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE **category Horde *copyright Horde LLC *license http
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE **category Horde *copyright Horde LLC *license http
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE **category Horde *copyright Horde LLC *copyright Phil Kernick *license http
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE **category Horde *copyright Horde LLC *license http
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE **category Horde *copyright Horde LLC *license http
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE **category Horde *copyright Horde LLC *license http
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE **category Horde *copyright Horde LLC *copyright Gerd Schaufelberger *license http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see Iterator
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF LIABILITY
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF LIABILITY
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF LIABILITY
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF LIABILITY
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF LIABILITY
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF LIABILITY
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF LIABILITY
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF LIABILITY
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF LIABILITY
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF LIABILITY
 
LOSS OF OR PROFITS
 
LOSS OF OR PROFITS
 
LOSS OF OR PROFITS
 
LOSS OF OR PROFITS
 
LOSS OF OR PROFITS
 
LOSS OF OR PROFITS
 
LOSS OF OR PROFITS
 
LOSS OF OR PROFITS
 
LOSS OF OR PROFITS
 
LOSS OF OR PROFITS
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see SeekableIterator
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see Serializable
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE
 
OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY *THEORY OF WHETHER IN STRICT OR TORT *INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE
 
 try
 
LOSS OF USE
 
LOSS OF USE
 
LOSS OF USE
 
LOSS OF USE
 
LOSS OF USE
 
LOSS OF USE
 
LOSS OF USE
 
LOSS OF USE
 
LOSS OF USE
 
LOSS OF USE
 

Detailed Description

Function Documentation

◆ __construct() [1/3]

__construct ( $obs = null)

Constructor.

Parameters
string$addressIf set, address is parsed and used as the object address. Address is not validated; first e-mail address parsed is used.
string$valueIdentification field value to parse.
mixed$obsAddress data to store in this object.

◆ __construct() [2/3]

__construct ( $groupname = null,
$addresses = null )

Constructor.

Parameters
mixed$dataThe mbox data. Either a resource or a filename as interpreted by fopen() (string).
integer$limitLimit to this many messages; additional messages will throw an exception.
Exceptions
Horde_Mail_Parse_Exception
Parameters
string$groupnameIf set, used as the group name.
mixed$addressesIf a GroupList object, used as the address list. Any other non-null value is parsed and used as the address list (addresses not verified; sub-groups are ignored).

◆ __construct() [3/3]

__construct ( array $params = array())

Constructor.

Parameters
arrayOptional parameters:
  • postSendCallback: (callback) Called after an email would have been sent.
  • preSendCallback: (callback) Called before an email would be sent.
array$paramsAdditional parameters:
  • sendmail_args: (string) Any extra parameters to pass to the sendmail or sendmail wrapper binary. DEFAULT: -i
  • sendmail_path: (string) The location of the sendmail binary on the filesystem. DEFAULT: /usr/sbin/sendmail
array$paramsAdditional parameters:
  • auth: (mixed) SMTP authentication. This value may be set to true, false or the name of a specific authentication method. If the value is set to true, the Net_SMTP package will attempt to use the best authentication method advertised by the remote SMTP server. DEFAULT: false.
  • debug: (boolean) Activate SMTP debug mode? DEFAULT: false
  • host: (string) The server to connect to. DEFAULT: localhost
  • localhost: (string) Hostname or domain that will be sent to the remote SMTP server in the HELO / EHLO message. DEFAULT: localhost
  • password: (string) The password to use for SMTP auth. DEFAULT: NONE
  • persist: (boolean) Should the SMTP connection persist? DEFAULT: false
  • pipelining: (boolean) Use SMTP command pipelining. Use SMTP command pipelining (specified in RFC 2920) if the SMTP server supports it. This speeds up delivery over high-latency connections. DEFAULT: false (use default value from Net_SMTP)
  • port: (integer) The port to connect to. DEFAULT: 25
  • timeout: (integer) The SMTP connection timeout. DEFAULT: NONE
  • username: (string) The username to use for SMTP auth. DEFAULT: NONE
array$paramsAdditional parameters:
  • chunk_size: (integer) If CHUNKING is supported on the server, the chunk size (in octets) to send. 0 will disable chunking.
Since
Horde_Smtp 1.7.0
  • context: (array) Any context parameters passed to stream_create_context().
Horde_Smtp 1.9.0
  • debug: (string) If set, will output debug information to the stream provided. The value can be any PHP supported wrapper that can be opened via fopen(). DEFAULT: No debug output
  • host: (string) The SMTP server. DEFAULT: localhost
  • localhost: (string) The hostname of the localhost. (since Horde_Smtp 1.9.0) DEFAULT: Auto-determined.
  • password: (string) The SMTP password. DEFAULT: NONE
  • port: (string) The SMTP port. DEFAULT: 587
  • secure: (string) Use SSL or TLS to connect. DEFAULT: true (use 'tls' option, if available)
    • false (No encryption)
    • 'ssl' (Auto-detect SSL version)
    • 'sslv2' (Force SSL version 2)
    • 'sslv3' (Force SSL version 3)
    • 'tls' (TLS; started via protocol-level negotation over unencrypted channel; RECOMMENDED way of initiating secure connection)
    • 'tlsv1' (TLS direct version 1.x connection to server) [
Horde_Smtp .3.0]
  • true (Use TLS, if available) [
Horde_Smtp 1.2.0] DEFAULT: No encryption
  • timeout: (integer) Connection timeout, in seconds. DEFAULT: 30 seconds
  • username: (string) The SMTP username. DEFAULT: NONE
  • xoauth2_token: (string) If set, will authenticate via the XOAUTH2 mechanism (if available) with this token. Either a string or a Horde_Smtp_Password object (since Horde_Smtp 1.1.0).
Parameters
array$paramsAdditional options:
  • debug: (boolean) Activate SMTP debug mode? DEFAULT: false
  • mailname: (string) The name of the local mail system (a valid hostname which matches the reverse lookup) DEFAULT: Auto-determined
  • netdns: (boolean) Use PEAR:Net_DNS2 (true) or the PHP builtin getmxrr(). DEFAULT: true
  • port: (integer) Port. DEFAULT: Auto-determined
  • test: (boolean) Activate test mode? DEFAULT: false
  • timeout: (integer) The SMTP connection timeout (in seconds). DEFAULT: 10
  • verp: (boolean) Whether to use VERP. If not a boolean, the string value will be used as the VERP separators. DEFAULT: false
  • vrfy: (boolean) Whether to use VRFY. DEFAULT: false

◆ __get()

__get ( $name)
Exceptions
Horde_Idna_Exception

◆ __toString()

__toString ( )

String representation of the object.

Return values
stringString representation.

◆ _error() [1/2]

_error ( $id,
$info = array() )
protected

Format error message.

Parameters
string$idMaps error ids to codes and message.
array$infoOptional information in associative array.
Exceptions
Horde_Mail_Exception

◆ _error() [2/2]

_error ( $text,
$error,
$e_code )
protected

Build a standardized string describing the current SMTP error.

Parameters
string$textCustom string describing the error context.
PEAR_Error$errorPEAR_Error object.
integer$e_codeError code.
Exceptions
Horde_Mail_Exception

◆ _getMx()

_getMx ( $host)
protected

Recieve MX records for a host.

Parameters
string$hostMail host.
Return values
mixedSorted MX list or false on error.

◆ _normalize()

_normalize ( $obs)
protected

Normalize objects to add to list.

Parameters
mixed$obsAddress data to store in this object.
Return values
arrayEntries to add.

◆ _writeAddress()

_writeAddress ( $opts)
abstractprotected

Class-specific implementation of writeAddress().

See also
writeAddress()
Parameters
array$optsSee writeAddress().
Return values
stringThe correctly escaped/quoted address.

◆ add()

add ( $obs)

Add objects to the container.

Parameters
mixed$obsAddress data to store in this object.

◆ addServiceExtensionParameter()

addServiceExtensionParameter ( $keyword,
$value = null )

Add parameter associated with a SMTP service extension.

Parameters
string$keywordExtension keyword.
string$valueAny value the keyword needs.

◆ contains()

contains ( $address)

Does this list contain the given e-mail address?

Parameters
mixed$addressAn e-mail address.
Return values
booleanTrue if the e-mail address is contained in the list.

◆ count()

count ( )

Index count.

Address count.

Return values
integerThe number of messages.
integerThe number of addresses.

◆ disconnect()

disconnect ( )

Disconnect and destroy the current SMTP connection.

Return values
booleanTrue if the SMTP connection no longer exists.

◆ first()

first ( )

Convenience method to return the first element in a list.

Useful since it allows chaining; older PHP versions did not allow array access dereferencing from the results of a function call.

Since
2.5.0
Return values
Horde_Mail_Rfc822_ObjectRfc822 object, or null if no object.

◆ getSMTPObject()

getSMTPObject ( )

Connect to the SMTP server by instantiating a Net_SMTP object.

Connect to the SMTP server by instantiating a Horde_Smtp object.

Return values
Net_SMTPThe SMTP object.
Exceptions
Horde_Mail_Exception
Return values
Horde_SmtpThe SMTP object.
Exceptions
Horde_Mail_Exception

◆ groupCount()

groupCount ( )

Group count.

Return values
integerThe number of groups in the list.

◆ match()

match ( $ob)
abstract

Compare this object against other data.

Parameters
mixed$obAddress data.
Return values
booleanTrue if the data reflects the same canonical address.

◆ matchDomain()

matchDomain ( $domain)

Do a case-insensitive match on the address for a given domain.

Matches as many parts of the subdomain in the address as is given in the input.

Parameters
string$domainDomain to match.
Return values
booleanTrue if the address matches the given domain.

◆ matchInsensitive()

matchInsensitive ( $ob)

Do a case-insensitive match on the address.

Per RFC 822/2822/5322, although the host portion of an address is case-insensitive, the mailbox portion is platform dependent.

Parameters
mixed$obAddress data.
Return values
booleanTrue if the data reflects the same case-insensitive address.

◆ parse()

parse ( $value)

Parse an identification header.

Parameters
string | null$valueIdentification field value to parse.

◆ remove()

remove ( $obs)

Remove addresses from the container.

This method ignores Group objects.

Parameters
mixed$obsAddresses to remove.

◆ setIteratorFilter()

setIteratorFilter ( $mask = 0,
$filter = null )

Set the Iterator filter.

Parameters
integer$maskFilter masks.
mixed$filterAn e-mail, or as list of e-mails, to filter by.

◆ unique()

unique ( )

Removes duplicate addresses from list.

This method ignores Group objects.

◆ writeAddress()

writeAddress ( $opts = array())

Write an address given information in this part.

Parameters
mixed$optsIf boolean true, is equivalent to passing true for both 'encode' and 'idn'. If an array, these keys are supported:
  • comment: (boolean) If true, include comment(s) in output?
Since
2.6.0 DEFAULT: false
  • encode: (mixed) MIME encode the personal/groupname parts? If boolean true, encodes in 'UTF-8'. If a string, encodes using this charset. DEFAULT: false
  • idn: (boolean) If true, encodes IDN domain names (RFC 3490). DEFAULT: false
  • noquote: (boolean) If true, don't quote personal part. [
2.4.0] DEFAULT: false
Return values
stringThe correctly escaped/quoted address.

Variable Documentation

◆ $_errorCode

array $_errorCode
protected

Internal error codes.

Translate internal error identifier to human readable messages.

◆ $_parsed

array $_parsed = array()
protected

Parsed data.

Each entry is an array containing 3 keys:

  • date: (mixed) Date information, in DateTime object. Null if date cannot be parsed. False if message is not MBOX data.
  • start: (integer) Start boundary.

◆ Iterator

*See the enclosed file LICENSE for license information (BSD). If you *did not receive this file see Iterator
Initial value:
{
protected resource $_data
array $_data
The working data for the current pageload.
Definition Cache.php:43

◆ Serializable

*See the enclosed file LICENSE for license information (BSD). If you *did not receive this file see Serializable
Initial value:
{
const HIDE_GROUPS = 1

◆ try

try
Initial value:
{
$this->_smtp->login()