Methods summary
public
|
#
__construct( array $params = array() )
Constructor.
Parameters
- $params
- <p>Additional 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</p>
|
public
|
#
send( mixed $recipients, array $headers, mixed $body )
Send a message.
Parameters
- $recipients
- <p>Either a comma-seperated list of recipients
(RFC822 compliant), or an array of
recipients, each RFC822 valid. This may
contain recipients not specified in the
headers, for Bcc:, resending messages, etc.</p>
- $headers
- <p>The headers to send with the mail, in an
associative array, where the array key is the
header name (ie, 'Subject'), and the array
value is the header value (ie, 'test'). The
header produced from those values would be
'Subject: test'.
If the '_raw' key exists, the value of this
key will be used as the exact text for
sending the message.</p>
- $body
- <p>The full text of the message body, including
any Mime parts, etc. Either a string or a
stream resource.</p>
Throws
|
public
Net_SMTP
|
#
getSMTPObject( )
Connect to the SMTP server by instantiating a Net_SMTP object.
Connect to the SMTP server by instantiating a Net_SMTP object.
Returns
Net_SMTP The SMTP object.
Throws
|
public
|
#
addServiceExtensionParameter( string $keyword, string $value = null )
Add parameter associated with a SMTP service extension.
Add parameter associated with a SMTP service extension.
Parameters
- $keyword
- Extension keyword.
- $value
- Any value the keyword needs.
|
public
boolean
|
#
disconnect( )
Disconnect and destroy the current SMTP connection.
Disconnect and destroy the current SMTP connection.
Returns
boolean True if the SMTP connection no longer exists.
|