15 |
|
|
16 |
|
IMAPHandler tester("imap.myrealbox.com", false); |
17 |
|
|
18 |
+ |
tester.capability(); |
19 |
+ |
tester.starttls(); |
20 |
+ |
tester.capability(); |
21 |
+ |
tester.noop(); |
22 |
+ |
|
23 |
+ |
char* login = new char[32 + 1]; |
24 |
+ |
char* password = new char[32 + 1]; |
25 |
+ |
|
26 |
+ |
cout << "login: " << flush; |
27 |
+ |
cin.getline(login, 32); |
28 |
+ |
cout << "password: " << flush; |
29 |
+ |
cin.getline(password, 32); |
30 |
+ |
|
31 |
+ |
tester.login(string(login) + ' ' + password); |
32 |
+ |
|
33 |
+ |
memset(login, 0, strlen(login)); |
34 |
+ |
memset(password, 0, strlen(password)); |
35 |
+ |
|
36 |
+ |
delete [] login; |
37 |
+ |
delete [] password; |
38 |
+ |
|
39 |
+ |
cout << tester.list("\"\" *"); |
40 |
+ |
|
41 |
+ |
tester.noop(); |
42 |
+ |
tester.logout(); |
43 |
+ |
|
44 |
|
return 0; |
45 |
|
} |