Overview
Features
Download
Documentation
Community
Add-Ons & Services

forward e-mail message! help please!

Please post support and help requests here.

forward e-mail message! help please!

Postby re.tf » 21 Jun 2012, 23:40

Hi,
I am trying create a forward mail message, I did try this, but don’t work for multpart message! How I can forward a e-mail?
Code: Select all

      try
   {
      POP3ClientSession session("mail.doknfe.com", 110);

      session.login("test10@doknfe.com", "1234567#");

      int nMailMessages = session.messageCount();

      if(nMailMessages)
      {
         MailMessage* pForwardMessage = new MailMessage();
         //MyPartHandler ph;

         session.retrieveMessage(1, *pForwardMessage);
         //session.retrieveMessage(1, std::cout);
      
         pForwardMessage->setSender("no-reply@dokfile.com");
         pForwardMessage->addRecipient(MailRecipient(MailRecipient::PRIMARY_RECIPIENT, "unrecognizable-mail@doknfe.com"));
         //pForwardMessage->setContent(pForwardMessage->getContent());

         SMTPClientSession session("smtp.doknfe.com", 25);

         session.login(Poco::Net::SMTPClientSession::AUTH_LOGIN, "no-reply@doknfe.com", "1234567#");
         session.sendMessage(*pForwardMessage);
         session.close();

         delete pForwardMessage;
      }
re.tf
 
Posts: 41
Joined: 11 Feb 2008, 15:49

Re: forward e-mail message! help please!

Postby alex » 26 Jun 2012, 04:31

Hard to tell without knowing what exactly it is the error and where does it occur when you run the code. "Don't work" does not convey enough information to provide help. For starters, perhaps trying to make sure you are connecting to right ports (is POP3 server SSL enabled ? ).

Please refrain from shouting and do your homework before posting (i.e. post minimum information so someone can help you).
alex
 
Posts: 1120
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron