2 #include <vmime/vmime.hpp> 4 #include <Wt/WString.h> 8 Wtx::Eml::Service::Account::Account
10 const std::string & name,
11 const std::string & protocol,
12 const std::string & hostname,
13 const std::string & username,
14 const std::string & password
21 Wt::WString(
"{1}://{2}:{3}@{4}")
30 auto url = vmime::utility::url( urlString );
32 auto sess = vmime::net::session::create();
33 auto store = sess-> getStore(url);
35 auto defaultFolder = store-> getDefaultFolder();
36 defaultFolder-> open( vmime::net::folder::Modes::MODE_READ_ONLY );
38 defaultFolder-> getAndFetchMessages
40 vmime::net::messageSet::byNumber(1,-1),
41 vmime::net::fetchAttributes::FLAGS |
42 vmime::net::fetchAttributes::ENVELOPE
46 defaultFolder-> getFolders();
48 std::cout << __FILE__ <<
":" << __LINE__
49 <<
" " << messages.size()
50 <<
" " << defaultFolder-> getName().generate()
51 <<
" " << folders.size()
55 for(
auto folder : folders )
57 std::cout << __FILE__ <<
":" << __LINE__
58 <<
" " << folder-> getName().generate()
67 583
for(
auto message : messages )·
69 585
auto flags =
message-> getFlags();·
71 587
auto header =
message-> getHeader();·
73 589 std::cout << __FILE__ <<
":" << __LINE__·
74 590 <<
" " << header-> Date()-> generate()·
75 591 << " " << header-> From()-> generate()·
86 const std::string & Wtx::Eml::Service::Account::name()
const const WString & message() const
Get the message.