#include <SMTProtocol.h>
List of all members.
Detailed Description
Implementation of the simple message transfer protocol. The implementation respects SMTP of RFC821 and the extended SMTP of RFC1869. The class tries first to get the functionality of the server using "EHLO". If it fails it automatically switches to "HELO". For authentication call first the authenticateSession() method before sending mails. According to RFC 4954 (authentication) the channel must be authenticated only once.
Constructor & Destructor Documentation
| TSMTProtocol::TSMTProtocol |
( |
const TString & |
rAddress, |
|
|
Uint |
uiPort = TCPPORT_SMTP |
|
) |
| |
Creates a SMTP handler out of a server name (address) and the port ID
- Parameters:
-
| rAddress | : Hostname or address of the server |
| uiPort | : Port ID of the server (default is TCPPORT_SMTP) |
| TSMTProtocol::TSMTProtocol |
( |
TSocket & |
rSocket ) |
|
creates the SMT protocol handler with a connected socket. As domain name the "local.domain.name" is used
- Parameters:
-
| rSocket | : already connected socket |
| TSMTProtocol::TSMTProtocol |
( |
TSocket & |
rSocket, |
|
|
const TString & |
rLocalDomainName |
|
) |
| |
creates the SMT protocol handler with a connected socket
- Parameters:
-
| rSocket | : already connected socket |
| rLocalDomainName | : any domain name, e.g local.domain.name |
| TSMTProtocol::~TSMTProtocol |
( |
) |
[protected, virtual] |
destroys the SMT protocol handler
Member Function Documentation
| Retval TSMTProtocol::authenticateSession |
( |
const TString & |
rUserName, |
|
|
const TString & |
rPassword |
|
) |
| |
Authenticates the SMTP session at the server
- Parameters:
-
| rUserName | : User of the E-Mail account |
| rPassword | : password of the user |
- Return values:
-
| RET_ACCESS_DENIED | : sender not accepted |
| RET_NOERROR | : authentication OK |
m_bAuthenticated && isConnected()
| void TSMTProtocol::close |
( |
) |
[protected] |
| bool zeus::TSMTProtocol::isAuthenticated |
( |
) |
const [inline] |
returns true if the session is authenticated
| bool zeus::TSMTProtocol::isConnected |
( |
) |
const [inline] |
returns if the connection to the SMTP server is OK
lists all recipients to the SMTP server
| void TSMTProtocol::open |
( |
const TString & |
rLocalDomainName ) |
[protected] |
| Uint zeus::TSMTProtocol::sendCommand |
( |
const TString & |
rCommand ) |
[inline, protected] |
sends a command to the SMTP
- Parameters:
-
- Returns:
- connection state
| Uint zeus::TSMTProtocol::sendCommand |
( |
const TString & |
rCommand, |
|
|
const TString & |
rArgument |
|
) |
| [inline, protected] |
sends a command with an argument to the SMTP.
- Parameters:
-
| rCommand | : SMTP command |
| rArgument | : Argument |
- Returns:
- connection state
| Uint zeus::TSMTProtocol::sendCommandWithResponse |
( |
const TString & |
rCommand, |
|
|
const TString & |
rArgument, |
|
|
TStringList & |
rlstResponse |
|
) |
| [inline, protected] |
sends a command with an argument to the SMTP.
- Parameters:
-
| rCommand | : SMTP command |
| rArgument | : Argument |
| rResponse | : response |
- Returns:
- connection state
| Uint TSMTProtocol::sendCommandWithResponse |
( |
const TString & |
rCommand, |
|
|
TStringList & |
rlstResponse |
|
) |
| [protected] |
sends a command to the SMTP and returns the response as a parameter
- Parameters:
-
| rCommand | : SMTP command |
| rResponse | : response |
- Returns:
- connection state
| Retval TSMTProtocol::sendEMail |
( |
TEMail & |
rMail ) |
|
Sends an E-Mail to the SMTP server
- Parameters:
-
- Return values:
-
| RET_NOERROR | : Mail sent to all recipients |
| RET_REQUEST_FAILED | : no connection |
| RET_SYNTAX_ERROR | : Invalid mail syntax |
| RET_INVALID_ADDRESS | : at least one recipient address is invalid |
| RET_ACCESS_DENIED | : sender not accepted |
The documentation for this class was generated from the following files: