Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

dsSMTP.h

Go to the documentation of this file.
00001 /*
00002  * $Id: dsSMTP.h,v 1.6 2003/08/27 15:40:41 dsamersoff Exp $
00003  */
00004 #ifndef dsdsSMTP_h
00005 #define dsdsSMTP_h
00006 
00007 #ifdef HAVE_CONFIG_H
00008 # include <config.h>
00009 #endif
00010 
00011 
00012 #ifdef HAVE_SYS_UTSNAME__H
00013 # include <sys/utsname.h>
00014 #endif
00015 
00016 
00017 #include <dsSocket.h>
00018 #include <dsStrstream.h>
00019 
00020 DECLARE_EXCEPTION(dsSMTP);
00024 class dsSMTP
00025 {
00026  dsSocket *_ms;
00027  int read_response();
00028 
00029 public:
00030 
00031         dsSMTP()
00032         { _ms = 0;
00033         }
00034 
00035         dsSMTP(const char *relay, int port = 25)
00036         { _ms = 0;
00037           Connect(relay); 
00038         }
00039 
00040         ~dsSMTP()
00041         { Close(); 
00042         }
00046         void Connect(const char *relay, int port = 25);
00050         void Close();
00051 
00056         void Send(const char *to, const char *from, const char *mes, const int len);
00057         void Send(const char *to, const char *from, std::istream& mes);
00058 
00059         void Send(const char *to, const char *from, const char *mes)
00060         { Send(to,from,mes, strlen(mes));
00061         }
00062 
00063         void ETRN(const char *relay, const char *domain);
00064 
00065 };
00066 
00067 #endif

Generated on Mon May 16 18:26:58 2005 for libdms4 by doxygen1.3-rc2