Unhandled Exception when creating POP3 client session

A general discussion forum.
Posts: 1
Joined: 28 Feb 2009, 20:56

Unhandled Exception when creating POP3 client session

Postby grafl » 28 Feb 2009, 23:20


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)
      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);
   catch (Exception& exc)
      std::cerr << exc.displayText() << std::endl;
      return 1;
   return 0;

Any suggestion?

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests