[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/system/pear/Net/ -> SMTP.php (sommaire)

(pas de description)

Poids: 1005 lignes (31 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Net_SMTP:: (30 méthodes):
  Net_SMTP()
  setDebug()
  _send()
  _put()
  _parseResponse()
  getResponse()
  connect()
  disconnect()
  _negotiate()
  _getBestAuthMethod()
  auth()
  _authDigest_MD5()
  _authCRAM_MD5()
  _authLogin()
  _authPlain()
  helo()
  mailFrom()
  rcptTo()
  quotedata()
  data()
  sendFrom()
  send_from()
  somlFrom()
  soml_from()
  samlFrom()
  saml_from()
  rset()
  vrfy()
  noop()
  identifySender()


Classe: Net_SMTP  - X-Ref

Provides an implementation of the SMTP protocol using PEAR's
Net_Socket:: class.

Net_SMTP($host = null, $port = null, $localhost = null)   X-Ref
Instantiates a new Net_SMTP object, overriding any defaults
with parameters that are passed in.

If you have SSL support in PHP, you can connect to a server
over SSL using an 'ssl://' prefix:

// 465 is a common smtps port.
$smtp = new Net_SMTP('ssl://mail.host.com', 465);
$smtp->connect();

param: string  $host       The server to connect to.
param: integer $port       The port to connect to.
param: string  $localhost  The value to give when sending EHLO or HELO.

setDebug($debug)   X-Ref
Set the value of the debugging flag.

param: boolean $debug      New value for the debugging flag.

_send($data)   X-Ref
Send the given string of data to the server.

param: string  $data       The string of data to send.
return: mixed   True on success or a PEAR_Error object on failure.

_put($command, $args = '')   X-Ref
Send a command to the server with an optional string of
arguments.  A carriage return / linefeed (CRLF) sequence will
be appended to each command string before it is sent to the
SMTP server - an error will be thrown if the command string
already contains any newline characters. Use _send() for
commands that must contain newlines.

param: string  $command    The SMTP command to send to the server.
param: string  $args       A string of optional arguments to append
return: mixed   The result of the _send() call.

_parseResponse($valid)   X-Ref
Read a reply from the SMTP server.  The reply consists of a response
code and a response message.

param: mixed   $valid      The set of valid response codes.  These
return: mixed   True if the server returned a valid response code or

getResponse()   X-Ref
Return a 2-tuple containing the last response from the SMTP server.

return: array   A two-element array: the first element contains the

connect($timeout = null, $persistent = false)   X-Ref
Attempt to connect to the SMTP server.

param: int     $timeout    The timeout value (in seconds) for the
param: bool    $persistent Should a persistent socket connection
return: mixed Returns a PEAR_Error with an error message on any

disconnect()   X-Ref
Attempt to disconnect from the SMTP server.

return: mixed Returns a PEAR_Error with an error message on any

_negotiate()   X-Ref
Attempt to send the EHLO command and obtain a list of ESMTP
extensions available, and failing that just send HELO.

return: mixed Returns a PEAR_Error with an error message on any

_getBestAuthMethod()   X-Ref
Returns the name of the best authentication method that the server
has advertised.

return: mixed    Returns a string containing the name of the best

auth($uid, $pwd , $method = '')   X-Ref
Attempt to do SMTP authentication.

param: string The userid to authenticate as.
param: string The password to authenticate with.
param: string The requested authentication method.  If none is
return: mixed Returns a PEAR_Error with an error message on any

_authDigest_MD5($uid, $pwd)   X-Ref
Authenticates the user using the DIGEST-MD5 method.

param: string The userid to authenticate as.
param: string The password to authenticate with.
return: mixed Returns a PEAR_Error with an error message on any

_authCRAM_MD5($uid, $pwd)   X-Ref
Authenticates the user using the CRAM-MD5 method.

param: string The userid to authenticate as.
param: string The password to authenticate with.
return: mixed Returns a PEAR_Error with an error message on any

_authLogin($uid, $pwd)   X-Ref
Authenticates the user using the LOGIN method.

param: string The userid to authenticate as.
param: string The password to authenticate with.
return: mixed Returns a PEAR_Error with an error message on any

_authPlain($uid, $pwd)   X-Ref
Authenticates the user using the PLAIN method.

param: string The userid to authenticate as.
param: string The password to authenticate with.
return: mixed Returns a PEAR_Error with an error message on any

helo($domain)   X-Ref
Send the HELO command.

param: string The domain name to say we are.
return: mixed Returns a PEAR_Error with an error message on any

mailFrom($sender, $params = null)   X-Ref
Send the MAIL FROM: command.

param: string $sender    The sender (reverse path) to set.
param: string $params    String containing additional MAIL parameters,
return: mixed Returns a PEAR_Error with an error message on any

rcptTo($recipient, $params = null)   X-Ref
Send the RCPT TO: command.

param: string $recipient The recipient (forward path) to add.
param: string $params    String containing additional RCPT parameters,
return: mixed Returns a PEAR_Error with an error message on any

quotedata(&$data)   X-Ref
Quote the data so that it meets SMTP standards.

This is provided as a separate public function to facilitate
easier overloading for the cases where it is desirable to
customize the quoting behavior.

param: string $data  The message text to quote. The string must be passed

data($data)   X-Ref
Send the DATA command.

param: string $data  The message body to send.
return: mixed Returns a PEAR_Error with an error message on any

sendFrom($path)   X-Ref
Send the SEND FROM: command.

param: string The reverse path to send.
return: mixed Returns a PEAR_Error with an error message on any

send_from($path)   X-Ref
Backwards-compatibility wrapper for sendFrom().

param: string The reverse path to send.
return: mixed Returns a PEAR_Error with an error message on any

somlFrom($path)   X-Ref
Send the SOML FROM: command.

param: string The reverse path to send.
return: mixed Returns a PEAR_Error with an error message on any

soml_from($path)   X-Ref
Backwards-compatibility wrapper for somlFrom().

param: string The reverse path to send.
return: mixed Returns a PEAR_Error with an error message on any

samlFrom($path)   X-Ref
Send the SAML FROM: command.

param: string The reverse path to send.
return: mixed Returns a PEAR_Error with an error message on any

saml_from($path)   X-Ref
Backwards-compatibility wrapper for samlFrom().

param: string The reverse path to send.
return: mixed Returns a PEAR_Error with an error message on any

rset()   X-Ref
Send the RSET command.

return: mixed Returns a PEAR_Error with an error message on any

vrfy($string)   X-Ref
Send the VRFY command.

param: string The string to verify
return: mixed Returns a PEAR_Error with an error message on any

noop()   X-Ref
Send the NOOP command.

return: mixed Returns a PEAR_Error with an error message on any

identifySender()   X-Ref
Backwards-compatibility method.  identifySender()'s functionality is
now handled internally.

return: boolean     This method always return true.



Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics