"Fossies" - the Fresh Open Source Software Archive

Member "xstress/include/sendmail.h" (19 Feb 2009, 1588 Bytes) of package /linux/privat/old/xstress-src-0.375-beta-20090219.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "sendmail.h" see the Fossies "Dox" file reference documentation.

    1 
    2 /*
    3  * xstress - xk0derz SMTP Stress Tester
    4  *
    5  * (c) Amit Singh amit@xkoder.com
    6  * http://xkoder.com
    7  *
    8  * This software and related files are licensed under GNU GPL version 2
    9  * Please visit the following webpage for more details
   10  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
   11  */
   12 
   13 #ifndef __SENDMAIL_H__
   14 
   15 #define __SENDMAIL_H__
   16 
   17 #include "common.h"
   18 
   19 using namespace std;
   20 
   21 /*SendMail Class*/
   22 class SendMail
   23 {
   24   public:
   25   int iSock;
   26 
   27   private:
   28   unsigned int uiLastState;
   29   unsigned int uiStateCounter;
   30   unsigned int uiServerPort;
   31   string sServerIP;
   32   int iState;
   33   int iAuthState;
   34   int bAuthDone;
   35   int bAuthenticated;
   36   int iConnected;
   37 
   38   string sTo;
   39   string sFrom;
   40   string sSubject;
   41   string sBody; /*File Name*/
   42   string sAttachment; /*File name*/
   43   string sAttachType;
   44 
   45   string sUsername;
   46   string sPassword;
   47   string sAuthType;
   48 
   49   string sRecvBuf;
   50   string sSendBuf;
   51   int iSentBytes;
   52   
   53 
   54   public:
   55   SendMail();
   56   SendMail(string _sTo, 
   57       string _sFrom, string _sSubject, string _sBody, string  _sAttachment);
   58   void setMailInfo
   59       (string _sTo, string _sFrom, string _sSubject, string _sBody, string _sAttachment);
   60   int changeState(int sockState);
   61   int run(int sockState);
   62   void setTo(string _sTo);
   63   void setFrom(string _sFrom);
   64   void setSubject(string _sSubject);
   65   void setBody(string _sBody);
   66   void setAttachment(string _sAttachment);
   67   
   68   int setServer(string _ip, unsigned int _port);
   69   void reset();
   70   void disconnect();
   71 
   72   void setAuthInfo(string _username, string _password, string _authType);
   73 
   74   int state();
   75   void resetAuth();
   76 };
   77 
   78 #endif