SmtpThread::ThreadedSMTPConnection Class Reference

#include <ThreadedSMTPConnection.h>

Inherits SmtpThread::Thread.

Inheritance diagram for SmtpThread::ThreadedSMTPConnection:

Inheritance graph
[legend]
Collaboration diagram for SmtpThread::ThreadedSMTPConnection:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ThreadedSMTPConnection ()
void Execute (void *arg)
bool isReady ()
SMTPConnection::SMTPState getSMTPState ()
void setSMTPHost (string host)
void setSMTPPort (int port)
void setMyHostname (string myname)
void sendMail (string &from, string &to, string &msg)

Detailed Description

ThreadedSMTPConnection-Class.

This class is inherited from the Thread-class. This means, you can initialize a ThreadedSMTPConnection-object, setup your ThreadedSMTPConnection, start threading and push a message to the ThreadedSMTPConnection. While the ThreadedSMTPConnection sends the message in its thread, you can continue doing other stuff.

ThreadedSMTPConnection speaks plain SMTP, no ESMTP.


Constructor & Destructor Documentation

SmtpThread::ThreadedSMTPConnection::ThreadedSMTPConnection (  ) 

Default constructor.


Member Function Documentation

void SmtpThread::ThreadedSMTPConnection::Execute ( void *  arg  )  [virtual]

The main thread-loop. Checks whether or not a mail is provided to the object and sends the mail.

Reimplemented from SmtpThread::Thread.

bool SmtpThread::ThreadedSMTPConnection::isReady (  ) 

Returns the current status of the thread.

Returns:
bool true / false = thread is ready / is not ready to accept mssages.

SMTPConnection::SMTPState SmtpThread::ThreadedSMTPConnection::getSMTPState (  ) 

Returns the current state of the SMTP-dialog.

void SmtpThread::ThreadedSMTPConnection::setSMTPHost ( string  host  ) 

Sets the IP-address of the SMTP-server.

NOTE: Must be an IP-address and not a domain-name!

Parameters:
string host IP-adress of SMTP-server.

void SmtpThread::ThreadedSMTPConnection::setSMTPPort ( int  port  ) 

Sets the port-number to connect to.

Parameters:
int port Port-number of the SMTP-server.

void SmtpThread::ThreadedSMTPConnection::setMyHostname ( string  myname  ) 

Sets the hostname to send within the HELO-command.

Parameters:
string myname Hostname of the sending host.

void SmtpThread::ThreadedSMTPConnection::sendMail ( string &  from,
string &  to,
string &  msg 
)

Send an email to the SMTP-server.

Parameters:
string from email-address of the sender.
string to email-address of the receiver.
string msg email-body, including all additional headers.


The documentation for this class was generated from the following files:
Generated on Thu Nov 1 09:53:40 2007 for libSmtpThread by  doxygen 1.5.1