ocSendMail Class Reference

#include <oc_Mail.h>

Collaboration diagram for ocSendMail:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

Definition at line 27 of file oc_Mail.h.


Constructor & Destructor Documentation

ocSendMail::ocSendMail ( string  address = "127.0.0.1",
int  port = 25 
)

Definition at line 87 of file oc_Mail.cpp.

References setMimeType().

ocSendMail::~ocSendMail (  ) 

Definition at line 93 of file oc_Mail.cpp.

ocSendMail::ocSendMail ( const char *  sendMailPath  ) 

Definition at line 80 of file ocMail.cpp.

References m_strExePath.

ocSendMail::~ocSendMail (  ) 

ocSendMail::ocSendMail ( string  address = "127.0.0.1",
int  port = 25 
)

ocSendMail::~ocSendMail (  ) 

ocSendMail::ocSendMail ( const char *  sendMailPath  ) 

ocSendMail::~ocSendMail (  ) 


Member Function Documentation

void ocSendMail::getTime ( void   )  [private]

Definition at line 18 of file oc_Mail.cpp.

References tm_time.

Referenced by makeBoundary().

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]

Definition at line 299 of file oc_Mail.cpp.

References smtp, and writelog2.

Referenced by send().

bool ocSendMail::loadAddresses ( string  path  ) 

Definition at line 51 of file oc_Mail.cpp.

References m_addresses.

Referenced by main().

string ocSendMail::getAddress ( string  name  ) 

Definition at line 76 of file oc_Mail.cpp.

References m_addresses.

Referenced by main().

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 
)

Definition at line 98 of file oc_Mail.cpp.

References m_strHeaders, and smtp.

Referenced by openRoute().

bool ocSendMail::setMimeType ( string  type  ) 

bool ocSendMail::write ( string  text  ) 

bool ocSendMail::send ( void   ) 

bool ocSendMail::attach ( ocFile inFile  ) 

Definition at line 314 of file oc_Mail.cpp.

References m_files, and ocFile::name.

string ocSendMail::makeUUID ( void   ) 

Definition at line 25 of file oc_Mail.cpp.

References ocString::replaceAll().

Referenced by makeBoundary().

string& ocSendMail::sendResult ( void   )  [inline]

Definition at line 82 of file oc_Mail.h.

References send_result.

Referenced by main().

string& ocSendMail::body ( void   )  [inline]

Definition at line 86 of file oc_Mail.h.

References m_strBody.

Referenced by main().

void ocSendMail::getTime ( void   )  [private]

string ocSendMail::makeBoundary ( void   )  [private]

void ocSendMail::decodeFile ( ocFiles::iterator &  pos  )  [private]

bool ocSendMail::loadAddresses ( const char *  path  ) 

Definition at line 44 of file ocMail.cpp.

References m_addresses.

const char * ocSendMail::getAddress ( const char *  name  ) 

Definition at line 69 of file ocMail.cpp.

References m_addresses.

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 
)

Definition at line 90 of file ocMail.cpp.

References m_strHeaders.

bool ocSendMail::setMimeType ( const char *  type  ) 

Definition at line 107 of file ocMail.cpp.

References m_content_type.

bool ocSendMail::write ( const char *  text  ) 

Definition at line 184 of file ocMail.cpp.

References m_pfOut, and m_strBody.

bool ocSendMail::send ( void   ) 

bool ocSendMail::attach ( ocFile inFile  ) 

bool ocSendMail::urlAttach ( const char *  url  ) 

Definition at line 274 of file ocMail.cpp.

References m_pfOut, and m_strBody.

string& ocSendMail::body ( void   )  [inline]

Definition at line 79 of file ocMail.h.

References m_strBody.

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]

Definition at line 82 of file oc_Mail.h.

References send_result.

string& ocSendMail::body ( void   )  [inline]

Definition at line 86 of file oc_Mail.h.

References m_strBody.

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]

Definition at line 79 of file ocMail.h.

References m_strBody.


Member Data Documentation

string ocSendMail::m_strExePath [private]

Definition at line 30 of file oc_Mail.h.

Referenced by ocSendMail(), and openRoute().

string ocSendMail::m_strHeaders [private]

Definition at line 31 of file oc_Mail.h.

Referenced by addHeader(), and openRoute().

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]

Definition at line 33 of file oc_Mail.h.

Referenced by makeBoundary(), and send().

string ocSendMail::m_endBoundary [private]

Definition at line 34 of file oc_Mail.h.

Referenced by makeBoundary(), and send().

Definition at line 35 of file oc_Mail.h.

Referenced by getAddress(), and loadAddresses().

string ocSendMail::m_content_type [private]

Definition at line 36 of file oc_Mail.h.

Referenced by send(), and setMimeType().

Definition at line 37 of file oc_Mail.h.

Referenced by attach(), and send().

tm ocSendMail::tm_time [private]

Definition at line 38 of file oc_Mail.h.

Referenced by getTime().

Definition at line 39 of file oc_Mail.h.

Referenced by addHeader(), decodeFile(), openRoute(), and send().

string ocSendMail::send_result [private]

Definition at line 40 of file oc_Mail.h.

Referenced by openRoute(), and sendResult().

string ocSendMail::m_strBody [private]

Definition at line 32 of file ocMail.h.

FILE* ocSendMail::m_pfOut [private]

Definition at line 35 of file ocMail.h.

Referenced by openRoute(), urlAttach(), and write().

FILE* ocSendMail::m_pfOut [private]

Definition at line 35 of file ocMail.h.


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

Generated on Sat Aug 15 12:48:31 2009 for w3systemsDevelopment by  doxygen 1.5.5