package Default
inherited_from \Zend\Stdlib\AbstractOptions

 Methods

Constructor

__construct(array|\Traversable|null $options = null
Inherited

Parameters

$options

array\Traversablenull

Get a configuration property

__get(string $key) : mixed
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__get()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Returns

mixed

Test if a configuration property is null

__isset(string $key) : boolean
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__isset()

Parameters

$key

string

Returns

boolean

Set a configuration property

__set(string $key, mixed $value) : void
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__set()

Parameters

$key

string

$value

mixed

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Set a configuration property to NULL

__unset(string $key) : void
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__unset()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Get connection class

getConnectionClass() : string

This should be either the class Zend\Mail\Protocol\Smtp or a class extending it -- typically a class in the Zend\Mail\Protocol\Smtp\Auth namespace.

Returns

string

Get connection configuration array

getConnectionConfig() : array

Returns

array

Get the host name

getHost() : string

Returns

string

Return the local client hostname

getName() : string

Returns

string

Get the port the SMTP server runs on

getPort() : integer

Returns

integer

Set connection class

setConnectionClass(string $connectionClass) : \Zend\Mail\Transport\SmtpOptions

Parameters

$connectionClass

string

the value to be set

Exceptions

\Zend\Mail\Exception\InvalidArgumentException

Returns

\Zend\Mail\Transport\SmtpOptions

Set connection configuration array

setConnectionConfig(array $connectionConfig) : \Zend\Mail\Transport\SmtpOptions

Parameters

$connectionConfig

array

Returns

\Zend\Mail\Transport\SmtpOptions

Set one or more configuration properties

setFromArray(array|\Traversable|\Zend\Stdlib\AbstractOptions $options) : \Zend\Stdlib\AbstractOptions
Inherited

Parameters

$options

array\Traversable\Zend\Stdlib\AbstractOptions

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Returns

\Zend\Stdlib\AbstractOptionsProvides fluent interface

Set the SMTP host

setHost(string $host) : \Zend\Mail\Transport\SmtpOptions
todo hostname/IP validation

Parameters

$host

string

Returns

\Zend\Mail\Transport\SmtpOptions

Set the local client hostname or IP

setName(string $name) : \Zend\Mail\Transport\SmtpOptions
todo hostname/IP validation

Parameters

$name

string

Exceptions

\Zend\Mail\Exception\InvalidArgumentException

Returns

\Zend\Mail\Transport\SmtpOptions

Set the port the SMTP server runs on

setPort(integer $port) : \Zend\Mail\Transport\SmtpOptions

Parameters

$port

integer

Exceptions

\Zend\Mail\Exception\InvalidArgumentException

Returns

\Zend\Mail\Transport\SmtpOptions

Cast to array

toArray() : array
Inherited

Returns

array

 Properties

 

We use the __ prefix to avoid collisions with properties in user-implementations.

$__strictMode__ : boolean

Default

true
 

$connectionClass

$connectionClass : string

Default

'smtp'
 

Connection configuration (passed to the underlying Protocol class)

$connectionConfig : array

Default

array()
 

Remote SMTP hostname or IP

$host : string

Default

'127.0.0.1'
 

Local client hostname

$name : string

Default

'localhost'
 

$port

$port : integer

Default

25