18 |
|
tester.capability(); |
19 |
|
tester.starttls(); |
20 |
|
tester.capability(); |
21 |
< |
tester.noop(); |
21 |
> |
// tester.noop(); |
22 |
|
|
23 |
|
char* login = new char[32 + 1]; |
24 |
|
char* password = new char[32 + 1]; |
37 |
|
delete [] password; |
38 |
|
|
39 |
|
cout << tester.list("\"\" *"); |
40 |
+ |
tester.status_("INBOX (MESSAGES UNSEEN)"); |
41 |
+ |
tester.examine("INBOX"); |
42 |
+ |
|
43 |
+ |
string message = string("Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)\r\n") |
44 |
+ |
+ "From: Fred Foobar <foobar@Blurdybloop.COM>\r\n" |
45 |
+ |
+ "Subject: afternoon meeting\r\n" |
46 |
+ |
+ "To: mooch@owatagu.siam.edu\r\n" |
47 |
+ |
+ "Message-Id: <B27397-0100000@Blurdybloop.COM>\r\n" |
48 |
+ |
+ "MIME-Version: 1.0\r\n" |
49 |
+ |
+ "Content-Type: TEXT/PLAIN; CHARSET=US-ASCII\r\n\r\n" |
50 |
+ |
+ "Hello Joe, do you think we can meet at 3:30 tomorrow?\r\n"; |
51 |
+ |
|
52 |
+ |
char length[4]; |
53 |
+ |
sprintf(length, "%u", message.length()); |
54 |
|
|
55 |
+ |
tester.append("INBOX {" + string(length) + "}", message); |
56 |
|
tester.noop(); |
57 |
|
tester.logout(); |
58 |
|
|