File: SendMSG.h

package info (click to toggle)
postman 2.0-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,036 kB
  • ctags: 3,078
  • sloc: cpp: 31,131; ansic: 1,948; sh: 787; makefile: 285
file content (75 lines) | stat: -rw-r--r-- 2,224 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
SendMSG.h
*/

#ifndef __SendMSG_H
#define __SendMSG_H

#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <signal.h>

#include "c-client.h"

#include "Language.h"
#include "Utils.h"
#include "Config.h"
#include "XSocket.h"
#include "XVector.h"
#include "Codecs.h"
#include "UserOptions.h"
#include "CCLIENT.h"

#define SIZEBOUNDARY LENGTHBOUNDARY + 10

class SendMSG
  {
  private:
    bool Quoted, savemsginsentmail;
    int UseSMTPAuthenticated;
    char BOUNDARY[SIZEBOUNDARY], *firsttext;
    TBuffer user, to, newsgroups, cc, bcc, subject, from, personalname, references, trueemail;
    UserOptions *uo;
    IPNAME localhost, defaulthost, server;
    CCLIENT *cclient;
    StringList SLTO, SLCC, SLBCC;
    const char *MakeBoundary (void);
    const char *MakeMidBoundary (const char *boundary);
    const char *MakeEndBoundary (const char *boundary);
    const char *MakeContentID (const char *user, const char *maildomain);
  public:
    SendMSG (const char *aserver, const char *flname, UserOptions *auo, 
             const char *adefaulthost, CCLIENT *acclient);
    virtual ~SendMSG ();  
    bool getMustSaveMsgSentmail (void);
    void setTO  (const char *ato);
    void setNNTPGROUPS (const char *anewsgroups);
    void setFROM (const char *afrom);
    void setCC  (const char *acc);
    void setBCC (const char *abcc);
    void setSUBJECT (const char *asubject);
    void setPERSONALNAME  (const char *apersonalname);
    void setFIRSTTEXT (const char *afirsttext);
    void setREFERENCES (const char *areferences);
    void setTRUEEMAIL  (const char *atrueemail);
    char *getTO (void);
    char *getNNTPGROUPS (void);    
    char *getFROM (void);
    char *getCC (void);
    char *getBCC (void);
    char *getSUBJECT (void);
    char *getPERSONALNAME (void);
    char *getFIRSTTEXT (void);
    char *getREFERENCES (void);
    char *getTRUEEMAIL (void);
    void DelAttachs (void);
    bool sendSMTP  (TBuffer errormsg, const char *sentmail, bool *createdsentmailfolder, const char *fnmailcap);
    bool sendNNTP  (TBuffer errormsg, const char *sentmail, bool *createdsentmailfolder, const char *fnmailcap);    
  };
  
#endif