#include <ThreadedSMTPConnection.h>
Inherits Thread.
Inheritance diagram for ThreadedSMTPConnection:


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) |
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.
Definition at line 47 of file ThreadedSMTPConnection.h.
| ThreadedSMTPConnection::ThreadedSMTPConnection | ( | ) |
Default constructor.
Definition at line 34 of file ThreadedSMTPConnection.cc.
| void 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 Thread.
Definition at line 49 of file ThreadedSMTPConnection.cc.
References Thread::_isRunning, SMTPConnection::disconnect(), Thread::getLock(), Thread::releaseLock(), and SMTPConnection::sendMail().
Here is the call graph for this function:

| bool ThreadedSMTPConnection::isReady | ( | ) |
Returns the current status of the thread.
Definition at line 133 of file ThreadedSMTPConnection.cc.
Referenced by SMTPConnectionPool::sendMail().
| SMTPConnection::SMTPState ThreadedSMTPConnection::getSMTPState | ( | ) |
Returns the current state of the SMTP-dialog.
Definition at line 149 of file ThreadedSMTPConnection.cc.
References SMTPConnection::getSMTPState().
Here is the call graph for this function:

| void ThreadedSMTPConnection::setSMTPHost | ( | string | host | ) |
Sets the IP-address of the SMTP-server.
NOTE: Must be an IP-address and not a domain-name!
| string | host IP-adress of SMTP-server. |
Definition at line 192 of file ThreadedSMTPConnection.cc.
References Thread::getLock(), Thread::releaseLock(), and SMTPConnection::setSMTPHost().
Referenced by SMTPConnectionPool::setSMTPHost().
Here is the call graph for this function:

| void ThreadedSMTPConnection::setSMTPPort | ( | int | port | ) |
Sets the port-number to connect to.
| int | port Port-number of the SMTP-server. |
Definition at line 216 of file ThreadedSMTPConnection.cc.
References Thread::getLock(), Thread::releaseLock(), and SMTPConnection::setSMTPPort().
Referenced by SMTPConnectionPool::setSMTPPort().
Here is the call graph for this function:

| void ThreadedSMTPConnection::setMyHostname | ( | string | myname | ) |
Sets the hostname to send within the HELO-command.
| string | myname Hostname of the sending host. |
Definition at line 236 of file ThreadedSMTPConnection.cc.
References Thread::getLock(), Thread::releaseLock(), and SMTPConnection::setMyHostname().
Referenced by SMTPConnectionPool::setMyHostname().
Here is the call graph for this function:

| void ThreadedSMTPConnection::sendMail | ( | string & | from, | |
| string & | to, | |||
| string & | msg | |||
| ) |
Send an email to the SMTP-server.
| string | from email-address of the sender. | |
| string | to email-address of the receiver. | |
| string | msg email-body, including all additional headers. |
Definition at line 166 of file ThreadedSMTPConnection.cc.
References Thread::getLock(), and Thread::releaseLock().
Referenced by SMTPConnectionPool::sendMail().
Here is the call graph for this function:

1.5.1