ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/IMAPHandler/Tester.cpp
(Generate patch)

Comparing trunk/IMAPHandler/Tester.cpp (file contents):
Revision 111 by douglas, 2003-03-31T21:07:30-08:00 vs.
Revision 114 by douglas, 2003-03-31T23:08:58-08:00

# Line 15 | Line 15 | int main(int argc, char* argv[])
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 +        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 +
59          return 0;
60   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines