SMTPMailer Class Reference
[Mail]

Class defining a simple SMTP mail client (reference RFCs 821 and 2821). More...

List of all members.

Public Member Functions

 authenticate ()
 authenticate_cram_md5 ()
 authenticate_digest_md5 ()
 authenticate_login ()
 authenticate_plain ()
 connect ()
 disconnect ($error= '')
 hmac ($hashfn, $blocksize, $data, $key)
 hmac_md5 ($data, $key= '')
 mail (&$mail, $recipients, $subject, $body, $headers= '')
 receive ($expected)
 receiveData ($expected, &$data)
 send ($command, $data= '')
 SMTPMailer ()


Detailed Description

Class defining a simple SMTP mail client (reference RFCs 821 and 2821).

TODO: TLS support

Definition at line 22 of file SMTPMailer.inc.php.


Member Function Documentation

SMTPMailer.authenticate (  ) 

Authenticate using the specified mechanism.

Returns:
boolean

Definition at line 235 of file SMTPMailer.inc.php.

References authenticate_cram_md5(), authenticate_digest_md5(), authenticate_login(), and authenticate_plain().

Referenced by mail().

SMTPMailer.authenticate_cram_md5 (  ) 

Authenticate using CRAM-MD5 (see RFC 2195).

Returns:
boolean

Definition at line 283 of file SMTPMailer.inc.php.

References hmac_md5(), receive(), receiveData(), and send().

Referenced by authenticate().

SMTPMailer.authenticate_digest_md5 (  ) 

Authenticate using DIGEST-MD5 (see RFC 2831).

Returns:
boolean

Definition at line 298 of file SMTPMailer.inc.php.

References receive(), receiveData(), and send().

Referenced by authenticate().

SMTPMailer.authenticate_login (  ) 

Authenticate using LOGIN.

Returns:
boolean

Definition at line 265 of file SMTPMailer.inc.php.

References receive(), and send().

Referenced by authenticate().

SMTPMailer.authenticate_plain (  ) 

Authenticate using PLAIN.

Returns:
boolean

Definition at line 254 of file SMTPMailer.inc.php.

References receive(), and send().

Referenced by authenticate().

SMTPMailer.connect (  ) 

Connect to the SMTP server.

Returns:
boolean

Definition at line 164 of file SMTPMailer.inc.php.

Referenced by mail().

SMTPMailer.disconnect ( error = ''  ) 

Disconnect from the SMTP server, sending a QUIT first.

Parameters:
$success boolean
Returns:
boolean

Definition at line 176 of file SMTPMailer.inc.php.

References receive(), and send().

Referenced by mail().

SMTPMailer.hmac ( hashfn,
blocksize,
data,
key 
)

Generic HMAC digest computation (see RFC 2104).

Parameters:
$hashfn string e.g., 'md5' or 'sha1'
$blocksize int
$data string
$key string
Returns:
string (as hex)

Definition at line 361 of file SMTPMailer.inc.php.

Referenced by hmac_md5().

SMTPMailer.hmac_md5 ( data,
key = '' 
)

Compute HMAC-MD5 digest.

Returns:
string (as hex)

Definition at line 375 of file SMTPMailer.inc.php.

References hmac().

Referenced by authenticate_cram_md5().

SMTPMailer.mail ( &$  mail,
recipients,
subject,
body,
headers = '' 
)

Send mail.

Parameters:
$mail Mailer
$recipients string
$subject string
$body string
$headers string

Definition at line 65 of file SMTPMailer.inc.php.

References authenticate(), connect(), disconnect(), Request.getServerHost(), receive(), and send().

SMTPMailer.receive ( expected  ) 

Receive a response.

Parameters:
$expected string/array expected response code(s)
Returns:
boolean

Definition at line 207 of file SMTPMailer.inc.php.

References receiveData().

Referenced by authenticate_cram_md5(), authenticate_digest_md5(), authenticate_login(), authenticate_plain(), disconnect(), and mail().

SMTPMailer.receiveData ( expected,
&$  data 
)

Receive a response and return the data payload.

Parameters:
$expected string/array expected response code
$data string buffer
Returns:
boolean

Definition at line 217 of file SMTPMailer.inc.php.

Referenced by authenticate_cram_md5(), authenticate_digest_md5(), and receive().

SMTPMailer.send ( command,
data = '' 
)

Send a command/data.

Parameters:
$command string
$data string
Returns:
boolean

Definition at line 195 of file SMTPMailer.inc.php.

Referenced by authenticate_cram_md5(), authenticate_digest_md5(), authenticate_login(), authenticate_plain(), disconnect(), and mail().

SMTPMailer.SMTPMailer (  ) 

Constructor.

Definition at line 45 of file SMTPMailer.inc.php.

References Config.getVar().


The documentation for this class was generated from the following file:

Generated on Mon Jul 14 10:55:47 2008 for Open Journal Systems by  doxygen 1.5.6