# PSMTP Class Reference

A TCP/IP socket for the Simple Mail Transfer Protocol. More...

`#include <inetmail.h>`

Inheritance diagram for PSMTP:

List of all members.

## Public Types

| HELO
| EHLO
| QUIT
| HELP
| NOOP
| TURN
| RSET
| VRFY
| EXPN
| RCPT
| MAIL
| SEND
| SAML
| SOML
| DATA
| AUTH
| NumCommands
enum | Commands { HELO, EHLO, QUIT, HELP, NOOP, TURN, RSET, VRFY, EXPN, RCPT, MAIL, SEND, SAML, SOML, DATA, AUTH, NumCommands }

## Protected Member Functions

| PSMTP ()

## Detailed Description

A TCP/IP socket for the Simple Mail Transfer Protocol.

When acting as a client, the procedure is to make the connection to a remote server, then to send a message using the following procedure: `PSMTPClient mail("mailserver"); if (mail.IsOpen()) { mail.BeginMessage("Me@here.com.au", "Fred@somwhere.com"); mail.Write(myMessage); if (!mail.EndMessage()) PError << "Mail send failed." << endl; } else PError << "Mail conection failed." << endl;`

When acting as a server, a descendant class would be created to override at least the LookUpName() and HandleMessage() functions. Other functions may be overridden for further enhancement to the sockets capabilities, but these two will give a basic SMTP server functionality.

The server socket thread would continuously call the ProcessMessage() function until it returns false. This will then call the appropriate virtual function on parsing the SMTP protocol.

## Member Enumeration Documentation

enum PSMTP::Commands

Enumerator:

  HELO |
  EHLO |
  QUIT |
  HELP |
  NOOP |
  TURN |
  RSET |
  VRFY |
  EXPN |
  RCPT |
  MAIL |
  SEND |
  SAML |
  SOML |
  DATA |
  AUTH |
  NumCommands |

## Constructor & Destructor Documentation

PSMTP::PSMTP | ( |  | ) | `[protected]`

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

- inetmail.h