-
Notifications
You must be signed in to change notification settings - Fork 0
/
MailIdentity.h
56 lines (50 loc) · 2.28 KB
/
MailIdentity.h
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
//---------------------------------------------------------------------------
#ifndef MailIdentityH
#define MailIdentityH
#include <stdlib.h>
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class PACKAGE TMailIdentity : public TComponent
{
private:
bool FRequireDispName;
AnsiString *FDispName;
TStringList *FEmails;
AnsiString *FValidNameChars;
AnsiString *FValidEmailChars;
protected:
bool __fastcall SelectEmailChar(AnsiString c);
bool __fastcall SelectNameChar(AnsiString c);
void __fastcall ExtractAddress(AnsiString str, AnsiString *addr);
void __fastcall ExtractName(AnsiString str, AnsiString *name);
void __fastcall SetRequireDispName(bool req);
AnsiString __fastcall GetDispName();
void __fastcall SetDispName(AnsiString name);
AnsiString __fastcall GetValidEmailChars();
void __fastcall SetValidEmailChars(AnsiString chars);
AnsiString __fastcall GetValidNameChars();
void __fastcall SetValidNameChars(AnsiString chars);
public:
__fastcall TMailIdentity(TComponent *Owner);
__fastcall TMailIdentity(TComponent *Owner, bool DispNameReqd);
__fastcall ~TMailIdentity();
void __fastcall Construct();
void __fastcall Clear();
void __fastcall ClearAddresses();
int __fastcall GetAddressCount();
AnsiString __fastcall GetAddress(int Num);
void __fastcall AddAddress(AnsiString addr);
void __fastcall AddAddresses(TStringList *addrlist);
int __fastcall ContainsAddress(AnsiString addr);
void __fastcall Export(AnsiString fname);
__published:
__property bool RequireDispName = {read=FRequireDispName, write=SetRequireDispName, default=false};
__property AnsiString DispName = {read=GetDispName, write=SetDispName};
__property AnsiString ValidNameChars = {read=GetValidNameChars, write=SetValidNameChars};
__property AnsiString ValidEmailChars = {read=GetValidEmailChars, write=SetValidEmailChars};
};
//---------------------------------------------------------------------------
#endif