Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: MailBee.NET POP3 vs MailBEE POP3 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Juda
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 23 April 2006 at 7:26am | IP Logged Quote Juda

what is the diffrent between the products ?
i need to develop my app under .net can i use the MailBee POP3 ???

I couldnt find any tutorial / code for creating .net application.

i need my application will connect to POP3 with my credinials and download email and save attachment on specific folder.

please help .
Back to Top View Juda's Profile Search for other posts by Juda
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 24 April 2006 at 1:49pm | IP Logged Quote Alex

Quote:

what is the diffrent between the products ?

MailBee Objects is a non-visual COM (so-called ActiveX) component, while MailBee.NET Objects is based on .NET technology.
MailBee.NET Objects is a fully managed code, without any external COM dependencies. Such code is more flexible and it
provides the better performance and reliability.

Quote:

i need to develop my app under .net can i use the MailBee POP3 ???

Yes, you can. Actually, you can use either MailBee POP3 or MailBee.NET POP3 components in .NET environment.

Quote:

I couldnt find any tutorial / code for creating .net application.

All documentation is included into regular packages of both MailBee Objects and MailBee.NET Objects products. Besides that,
you can access MailBee.NET Objects documentation on-line at http://www.afterlogic.com/mailbee_net/docs/.

Quote:

i need my application will connect to POP3 with my credinials and download email and save attachment on specific folder.

The following C# samples download the last e-mail from mailbox via POP3 protocol and save attachments into specific folder:

Sample powered by MailBee Objects:

Code:

using System;
using MailBee;

class Sample
{
        [STAThread]
        static void Main(string[] args)
        {
                 POP3Class pop = new POP3Class();

                 pop.LicenseKey = "";
                 pop.Connect("mail.domain.com", 110, "jdoe", "secret");

                 if(pop.MessageCount > 0)
                 {
                           Console.WriteLine("Processing message number " + pop.InboxMessageCount);

                           // Download the message.
                           Message msg = pop.RetrieveSingleMessage(pop.MessageCount);

                           // Check if there are any attachments
                           if (msg.Attachments.Count == 0)
                           {
                                   Console.WriteLine("No attachments available");
                           }
                           else
                           {
                                   // Save all attachments into the folder.
                                   foreach (MailBee.Attachment atch in msg.Attachments)
                                   {
                                             atch.SaveFile(@"C:\Temp", null);
                                   }
                           }

                           Console.WriteLine("Message successfully processed. " + msg.Attachments.Count + " attachments
saved.");
                 }
                 else
                 {
                           Console.WriteLine("There are no messages in mailbox");
                 }

                 pop.Disconnect();
        }
}


Sample powered by MailBee.NET Objects:

Code:

using System;
using MailBee;
using MailBee.Pop3Mail;
using MailBee.Mime;

class Sample
{
        // The actual code.
        static void Main(string[] args)
        {
                 Pop3.LicenseKey = "Put your license key here";
                 Pop3 pop = new Pop3();
                 pop.Connect("mail.domain.com");
                 pop.Login("jdoe", "secret");

                 if (pop.InboxMessageCount > 0)
                 {
                           Console.WriteLine("Processing message number " + pop.InboxMessageCount);

                           // Download the message.
                           MailMessage msg = pop.DownloadEntireMessage(pop.InboxMessageCount);

                           // Check if there are any attachments
                           if (msg.Attachments.Count == 0)
                           {
                                   Console.WriteLine("No attachments available");
                           }
                           else
                           {
                                   // Save all attachments into the folder.
                                   msg.Attachments.SaveAll(@"C:\Temp");
                           }

                           Console.WriteLine("Message successfully processed. " + msg.Attachments.Count + " attachments
saved.");
                 }
                 else
                 {
                           Console.WriteLine("There are no messages in mailbox");
                 }

                 pop.Disconnect();
        }
}


Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide