#include <oc_Mail.h>

Public Member Functions | |
| ocSendMail (string address="127.0.0.1", int port=25) | |
| ~ocSendMail () | |
| bool | loadAddresses (string path) |
| string | getAddress (string name) |
| bool | openRoute (string from, string to, string subject, string cc="", string bcc="", string serverAddress="127.0.0.1") |
| bool | addHeader (string header, string value) |
| bool | setMimeType (string type) |
| bool | write (string text) |
| bool | send (void) |
| bool | attach (ocFile &inFile) |
| string | makeUUID (void) |
| string & | sendResult (void) |
| string & | body (void) |
| ocSendMail (const char *sendMailPath) | |
| ~ocSendMail () | |
| bool | loadAddresses (const char *path) |
| const char * | getAddress (const char *name) |
| bool | openRoute (const char *from, const char *to, const char *subject, const char *cc=NULL, const char *bcc=NULL) |
| bool | addHeader (const char *header, const char *value) |
| bool | setMimeType (const char *type) |
| bool | write (const char *text) |
| bool | send (void) |
| bool | attach (ocFile &inFile) |
| bool | urlAttach (const char *url) |
| string & | body (void) |
| ocSendMail (string address="127.0.0.1", int port=25) | |
| ~ocSendMail () | |
| bool | loadAddresses (string path) |
| string | getAddress (string name) |
| bool | openRoute (string from, string to, string subject, string cc="", string bcc="", string serverAddress="127.0.0.1") |
| bool | addHeader (string header, string value) |
| bool | setMimeType (string type) |
| bool | write (string text) |
| bool | send (void) |
| bool | attach (ocFile &inFile) |
| string | makeUUID (void) |
| string & | sendResult (void) |
| string & | body (void) |
| ocSendMail (const char *sendMailPath) | |
| ~ocSendMail () | |
| bool | loadAddresses (const char *path) |
| const char * | getAddress (const char *name) |
| bool | openRoute (const char *from, const char *to, const char *subject, const char *cc=NULL, const char *bcc=NULL) |
| bool | addHeader (const char *header, const char *value) |
| bool | setMimeType (const char *type) |
| bool | write (const char *text) |
| bool | send (void) |
| bool | attach (ocFile &inFile) |
| bool | urlAttach (const char *url) |
| string & | body (void) |
Private Member Functions | |
| void | getTime (void) |
| string | makeBoundary (void) |
| void | decodeFile (ocFiles::iterator &pos) |
| void | getTime (void) |
| string | makeBoundary (void) |
| void | decodeFile (ocFiles::iterator &pos) |
| void | getTime (void) |
| string | makeBoundary (void) |
| void | decodeFile (ocFiles::iterator &pos) |
| void | getTime (void) |
| string | makeBoundary (void) |
| void | decodeFile (ocFiles::iterator &pos) |
Private Attributes | |
| string | m_strExePath |
| string | m_strHeaders |
| ocString | m_strBody |
| string | m_beginBoundary |
| string | m_endBoundary |
| strStrMap | m_addresses |
| string | m_content_type |
| ocFiles | m_files |
| tm | tm_time |
| oc_SMTP | smtp |
| string | send_result |
| string | m_strBody |
| FILE * | m_pfOut |
| FILE * | m_pfOut |
Definition at line 27 of file oc_Mail.h.
| ocSendMail::ocSendMail | ( | string | address = "127.0.0.1", |
|
| int | port = 25 | |||
| ) |
| ocSendMail::~ocSendMail | ( | ) |
Definition at line 93 of file oc_Mail.cpp.
| ocSendMail::ocSendMail | ( | const char * | sendMailPath | ) |
| ocSendMail::~ocSendMail | ( | ) |
| ocSendMail::ocSendMail | ( | string | address = "127.0.0.1", |
|
| int | port = 25 | |||
| ) |
| ocSendMail::~ocSendMail | ( | ) |
| ocSendMail::ocSendMail | ( | const char * | sendMailPath | ) |
| ocSendMail::~ocSendMail | ( | ) |
| void ocSendMail::getTime | ( | void | ) | [private] |
| string ocSendMail::makeBoundary | ( | void | ) | [private] |
Definition at line 38 of file oc_Mail.cpp.
References getTime(), m_beginBoundary, m_endBoundary, and makeUUID().
Referenced by send().
| void ocSendMail::decodeFile | ( | ocFiles::iterator & | pos | ) | [private] |
| bool ocSendMail::loadAddresses | ( | string | path | ) |
| string ocSendMail::getAddress | ( | string | name | ) |
| bool ocSendMail::openRoute | ( | string | from, | |
| string | to, | |||
| string | subject, | |||
| string | cc = "", |
|||
| string | bcc = "", |
|||
| string | serverAddress = "127.0.0.1" | |||
| ) |
Definition at line 131 of file oc_Mail.cpp.
References addHeader(), oc_SMTP::data(), oc_SMTP::error, oc_SMTP::helo(), oc_SMTP::isConnected, m_strBody, m_strHeaders, oc_SMTP::mail_from(), oc_SMTP::quit(), oc_SMTP::rcpt_to(), oc_SMTP::response, send_result, smtp, and writelog.
Referenced by mail_functor::doMail(), virtualCheckout::emailClerk(), virtualCheckout::emailcustomer(), virtualCheckout::emailManufacturer(), main(), and mailpage::send().
| bool ocSendMail::addHeader | ( | string | header, | |
| string | value | |||
| ) |
Definition at line 98 of file oc_Mail.cpp.
References m_strHeaders, and smtp.
Referenced by openRoute().
| bool ocSendMail::setMimeType | ( | string | type | ) |
Definition at line 112 of file oc_Mail.cpp.
References m_content_type.
Referenced by mail_functor::doMail(), virtualCheckout::emailClerk(), virtualCheckout::emailcustomer(), virtualCheckout::emailManufacturer(), main(), ocSendMail(), openRoute(), and mailpage::send().
| bool ocSendMail::write | ( | string | text | ) |
Definition at line 209 of file oc_Mail.cpp.
References m_strBody.
Referenced by mail_functor::doMail(), virtualCheckout::emailClerk(), virtualCheckout::emailcustomer(), virtualCheckout::emailManufacturer(), and mailpage::send().
| bool ocSendMail::send | ( | void | ) |
Definition at line 221 of file oc_Mail.cpp.
References decodeFile(), oc_SMTP::end_data(), oc_SMTP::isConnected, m_beginBoundary, m_content_type, m_endBoundary, m_files, m_strBody, makeBoundary(), oc_SMTP::quit(), ocString::replaceAll(), smtp, writelog, and writelog2.
Referenced by mail_functor::doMail(), virtualCheckout::emailClerk(), virtualCheckout::emailcustomer(), virtualCheckout::emailManufacturer(), main(), and mailpage::send().
| bool ocSendMail::attach | ( | ocFile & | inFile | ) |
| string ocSendMail::makeUUID | ( | void | ) |
Definition at line 25 of file oc_Mail.cpp.
References ocString::replaceAll().
Referenced by makeBoundary().
| string& ocSendMail::sendResult | ( | void | ) | [inline] |
| string& ocSendMail::body | ( | void | ) | [inline] |
| void ocSendMail::getTime | ( | void | ) | [private] |
| string ocSendMail::makeBoundary | ( | void | ) | [private] |
| void ocSendMail::decodeFile | ( | ocFiles::iterator & | pos | ) | [private] |
| bool ocSendMail::loadAddresses | ( | const char * | path | ) |
| const char * ocSendMail::getAddress | ( | const char * | name | ) |
| bool ocSendMail::openRoute | ( | const char * | from, | |
| const char * | to, | |||
| const char * | subject, | |||
| const char * | cc = NULL, |
|||
| const char * | bcc = NULL | |||
| ) |
Definition at line 121 of file ocMail.cpp.
References addHeader(), m_pfOut, m_strBody, m_strExePath, m_strHeaders, and setMimeType().
| bool ocSendMail::addHeader | ( | const char * | header, | |
| const char * | value | |||
| ) |
| bool ocSendMail::setMimeType | ( | const char * | type | ) |
| bool ocSendMail::write | ( | const char * | text | ) |
| bool ocSendMail::send | ( | void | ) |
| bool ocSendMail::attach | ( | ocFile & | inFile | ) |
| bool ocSendMail::urlAttach | ( | const char * | url | ) |
| string& ocSendMail::body | ( | void | ) | [inline] |
| void ocSendMail::getTime | ( | void | ) | [private] |
| string ocSendMail::makeBoundary | ( | void | ) | [private] |
| void ocSendMail::decodeFile | ( | ocFiles::iterator & | pos | ) | [private] |
| bool ocSendMail::loadAddresses | ( | string | path | ) |
| string ocSendMail::getAddress | ( | string | name | ) |
| bool ocSendMail::openRoute | ( | string | from, | |
| string | to, | |||
| string | subject, | |||
| string | cc = "", |
|||
| string | bcc = "", |
|||
| string | serverAddress = "127.0.0.1" | |||
| ) |
| bool ocSendMail::addHeader | ( | string | header, | |
| string | value | |||
| ) |
| bool ocSendMail::setMimeType | ( | string | type | ) |
| bool ocSendMail::write | ( | string | text | ) |
| bool ocSendMail::send | ( | void | ) |
| bool ocSendMail::attach | ( | ocFile & | inFile | ) |
| string ocSendMail::makeUUID | ( | void | ) |
| string& ocSendMail::sendResult | ( | void | ) | [inline] |
| string& ocSendMail::body | ( | void | ) | [inline] |
| void ocSendMail::getTime | ( | void | ) | [private] |
| string ocSendMail::makeBoundary | ( | void | ) | [private] |
| void ocSendMail::decodeFile | ( | ocFiles::iterator & | pos | ) | [private] |
| bool ocSendMail::loadAddresses | ( | const char * | path | ) |
| const char* ocSendMail::getAddress | ( | const char * | name | ) |
| bool ocSendMail::openRoute | ( | const char * | from, | |
| const char * | to, | |||
| const char * | subject, | |||
| const char * | cc = NULL, |
|||
| const char * | bcc = NULL | |||
| ) |
| bool ocSendMail::addHeader | ( | const char * | header, | |
| const char * | value | |||
| ) |
| bool ocSendMail::setMimeType | ( | const char * | type | ) |
| bool ocSendMail::write | ( | const char * | text | ) |
| bool ocSendMail::send | ( | void | ) |
| bool ocSendMail::attach | ( | ocFile & | inFile | ) |
| bool ocSendMail::urlAttach | ( | const char * | url | ) |
| string& ocSendMail::body | ( | void | ) | [inline] |
string ocSendMail::m_strExePath [private] |
string ocSendMail::m_strHeaders [private] |
string ocSendMail::m_strBody [private] |
Definition at line 32 of file oc_Mail.h.
Referenced by body(), openRoute(), send(), urlAttach(), and write().
string ocSendMail::m_beginBoundary [private] |
string ocSendMail::m_endBoundary [private] |
strStrMap ocSendMail::m_addresses [private] |
string ocSendMail::m_content_type [private] |
ocFiles ocSendMail::m_files [private] |
tm ocSendMail::tm_time [private] |
oc_SMTP ocSendMail::smtp [private] |
Definition at line 39 of file oc_Mail.h.
Referenced by addHeader(), decodeFile(), openRoute(), and send().
string ocSendMail::send_result [private] |
string ocSendMail::m_strBody [private] |
FILE* ocSendMail::m_pfOut [private] |
FILE* ocSendMail::m_pfOut [private] |
1.5.5