After compiling succesfuly the Poco libraries from source with VS 2008
I created a command-line client to access my POP3 mailbox. But the
builded application throws an unhandled exception. This is the source code:
- Code: Select all
#include "Poco/Net/MailMessage.h"
#include "Poco/Net/MailRecipient.h"
#include "Poco/Net/POP3ClientSession.h"
#include "Poco/Net/StringPartSource.h"
#include "Poco/Path.h"
#include "Poco/Exception.h"
#include <iostream>
#include <stdio.h>
using Poco::Net::MailMessage;
using Poco::Net::MailRecipient;
using Poco::Net::POP3ClientSession;
using Poco::Net::StringPartSource;
using Poco::Path;
using Poco::Exception;
int main(int argc, char** argv)
{
try
{
std::string mailhost(argv[1]);
std::string username(argv[2]);
std::string password(argv[3]);
POP3ClientSession p3s(mailhost, Poco::Net::POP3ClientSession::POP3_PORT);
POP3ClientSession p3s(sa);
p3s.login(username, password);
p3s.close();
}
catch (Exception& exc)
{
std::cerr << exc.displayText() << std::endl;
return 1;
}
return 0;
}
Any suggestion?
Laci





