Sign In  Sign Up Live-Chat

Question about logout or disconnect from an Exchange server

Last post 08-16-2008, 9:50 PM by iret. 1 replies.
Sort Posts: Previous Next
  •  08-13-2008, 3:41 PM 139599

    Question about logout or disconnect from an Exchange server

    Hello

    I downloaded the ExchangeConsoleDemo.zip and was looking through the code.  I do not see a logout or disconnect method.  Is this unneccesary for Exchange?  In other words, Disconnect() is to POP3Client as ?? is to ExchangeClient.

    Thanks

    Mike

    ExchangeConsoleDemo.zip snippet from Class1.cs:

       //Initilize the ExchangeClient

       string mailboxUri = "http://gz.aspose.com/exchange/mybox";
       string username = "myusername";
       string password = "12345678";
       string domain = "aspose";

       NetworkCredential credential = new NetworkCredential(username, password, domain);

       //create an exchangeclient
       ExchangeClient client = new ExchangeClient(mailboxUri, credential);


       try
       {
        //Send the email via the exchage server
        client.Send(msg1);

        //query mailbox
        ExchangeMailboxInfo mailbox = client.GetMailboxInfo();
        //list messages in the Inbox
        ExchangeMessageInfoCollection messages = client.ListMessages(mailbox.InboxUri, false);

        foreach (ExchangeMessageInfo info in messages)
        {
         //save the message locally
         client.SaveMessage(info.UniqueUri, info.Subject + ".eml");
        }
        
        
       }
       catch(ExchangeException ex)
       {
        Console.WriteLine(ex.ToString());
       }

     
  •  08-16-2008, 9:50 PM 140045 in reply to 139599

    Re: Question about logout or disconnect from an Exchange server

    Hello,

    You don't need to warry about the disconnect. We will take care of it.

    Thanks


    Team Lead
    Aspose Guangzhou Team
    About Us

    Contact Us
     
View as RSS news feed in XML