|
#include <CBaseMailConnect.h>

Public Member Functions | |
| CBaseMailConnect () | |
| Default constructor. | |
| virtual | ~CBaseMailConnect () |
| Default destructor. | |
| std::string | from () const |
| void | from (std::string addr) |
| std::string | to () const |
| void | to (std::string addr) |
| std::string | cc () const |
| void | cc (std::string addr) |
| std::string | bcc () const |
| void | bcc (std::string addr) |
| std::string | subject () const |
| void | subject (std::string subj) |
| std::string | body () const |
| void | body (const std::string &body, bool smtp) |
| Sets the current plain text part of e-mail message. | |
| std::string | attachments () const |
| void | attachments (std::string attachments) |
| const CBuffer & | messageBuffer () const |
| void | mimeMessage (CBuffer &buffer) |
| virtual void | sendMessage ()=0 |
Protected Member Functions | |
| void | mimeFile (std::string fileName, std::string fileAlias, std::stringstream &message) |
| Encoding the message into internal message buffer. | |
Protected Attributes | |
| std::string | m_from |
| Mail FROM: a single e-mail address in format: "Jonh Doe <jonhd@noname.com>". | |
| std::string | m_to |
| Mail TO: semicolon-separated string of addresses in format: "Jonh Doe <jonhd@noname.com>; Jane Doe <janed@noname.com>". | |
| std::string | m_cc |
| Mail CC: semicolon-separated string of addresses in format: "Jonh Doe <jonhd@noname.com>; Jane Doe <janed@noname.com>". | |
| std::string | m_bcc |
| Mail BCC: semicolon-separated string of addresses in format: "Jonh Doe <jonhd@noname.com>; Jane Doe <janed@noname.com>". | |
| std::string | m_subject |
| Mail SUBJECT:. | |
| CMailMessageBody | m_body |
| Mail text (plain-text and html parts of the message). | |
| std::string | m_attachments |
| The list of attachment files separated with ';'. | |
| CBuffer | m_messageBuffer |
| Internal message buffer. | |
CBaseMailConnect class is the base class for mail message components
| void sptk::CBaseMailConnect::attachments | ( | std::string | attachments | ) | [inline] |
Method attachments() sets the current semicolon-separated list of attachments of e-mail message. Example: "readme.txt;readme.doc".
| attachments | current message list of attachments |
References m_attachments.
| std::string sptk::CBaseMailConnect::attachments | ( | ) | const [inline] |
Method attachments() returns the current semicolon-separated list of attachments of e-mail message. Example: "readme.txt;readme.doc".
References m_attachments.
| void sptk::CBaseMailConnect::bcc | ( | std::string | addr | ) | [inline] |
Method bcc() sets the current value of 'BCC:' field of e-mail message.
| addr | should be a semicolon-separated list of one or more e-mail addresses in format: Real sender name <sender@host.net>. The example: John Doe <johnd@unknown.org> |
References m_bcc.
| std::string sptk::CBaseMailConnect::bcc | ( | ) | const [inline] |
| void sptk::CBaseMailConnect::body | ( | const std::string & | body, | |
| bool | smtp | |||
| ) | [inline] |
Sets the current plain text part of e-mail message.
| body | std::string&, message body | |
| smtp | bool, do we need special pre-processing for SMTP? |
References m_body, and sptk::CMailMessageBody::text().
| std::string sptk::CBaseMailConnect::body | ( | ) | const [inline] |
Method subject() returns the current plain text part of e-mail message.
References m_body, and sptk::CMailMessageBody::text().
| void sptk::CBaseMailConnect::cc | ( | std::string | addr | ) | [inline] |
Method cc() sets the current value of 'CC:' field of e-mail message.
| addr | should be a semicolon-separated list of one or more e-mail addresses in format: Real sender name <sender@host.net>. The example: John Doe <johnd@unknown.org> |
References m_cc.
| std::string sptk::CBaseMailConnect::cc | ( | ) | const [inline] |
| void sptk::CBaseMailConnect::from | ( | std::string | addr | ) | [inline] |
Method from() sets the current value of 'FROM:' field of e-mail message.
| addr | should be an e-mail address in format: Real sender name <sender@host.net>. The example: John Doe <johnd@unknown.org> |
References m_from.
| std::string sptk::CBaseMailConnect::from | ( | ) | const [inline] |
| const CBuffer& sptk::CBaseMailConnect::messageBuffer | ( | ) | const [inline] |
Method messageBuffer() returns the reference to the internal current message text completely prepared for sending, as described in RFC-822 message format. It only makes sense to use it after call to sendMessage().
References m_messageBuffer.
| void sptk::CBaseMailConnect::mimeMessage | ( | CBuffer & | buffer | ) |
Method mimeMessage() encodes the message components into RFC-822 message format.
| buffer | A buffer to put the encoded RFC-822 format message |
| virtual void sptk::CBaseMailConnect::sendMessage | ( | ) | [pure virtual] |
Method sendMessage() builds an RFC-822 format message out of message parameters, and sends it. Should be implemented in derived classes.
Implemented in sptk::CSmtpConnect.
| void sptk::CBaseMailConnect::subject | ( | std::string | subj | ) | [inline] |
| std::string sptk::CBaseMailConnect::subject | ( | ) | const [inline] |
| void sptk::CBaseMailConnect::to | ( | std::string | addr | ) | [inline] |
Method from() sets the current value of 'TO:' field of e-mail message.
| addr | should be a semicolon-separated list of one or more e-mail addresses in format: Real sender name <sender@host.net>. The example: John Doe <johnd@unknown.org> |
References m_to.
| std::string sptk::CBaseMailConnect::to | ( | ) | const [inline] |