C# .NET - Outlook express access using C#

Asked By pampati praveen
04-Sep-02 10:32 PM
HI,

I want to write small application which can backup outlook express. i.e i wnat to show to the user messages availbale and ask him to choose for backup and store the chosen messages. is it possible to do with C#? If so, How can i access outlook express and its messages in C# ? Please clarify me as soon as possible.

Thanking you

Regards
Praveen P
mailtopampati@rediffmail.com

All you need to do is backup  All you need to do is backup

05-Sep-02 04:33 PM
the selected message stores using the filesystem:

For example, the Outlook Express Inbox for a given user is located:

 C:\Documents and Settings\[username]\Local Settings\Application Data\Identities\{GUID FOR IDENTITY}\Microsoft\Outlook Express\Inbox.dbx

Don't know of any way to access Outlook Express and its messages programmatically in any language because MS never put an object model in it, only in the "for pay"
MS Outlook that comes with MS Office.

Try this  Try this

02-Apr-08 08:57 AM

Outlook made a local file for all messages(where is that file I have no idea may be in outlook folder).
If you understand the format of that file then you can get the messages which are checked by the user from the file and save it to another file in the same format.

Access Outlook Mails  Access Outlook Mails

01-Dec-08 08:14 AM

Hi. you can use the below code to access outlook mails..

[CODE]

 using Outlook;

 Outlook.Application oOutlook;
 Outlook.NameSpace oNs;
 Outlook.MAPIFolder oFldr;
 long iAttachCnt;

 try
 {
     oOutlook = new Outlook.Application();
     oNs = oOutlook.GetNamespace(”MAPI”);

     //getting mail folder from inbox
     oFldr = oNs.GetDefaultFolder(OlDefaultFolders.olFolderInbox);
     Response.Write(”Total Mail(s) in Inbox :” + oFldr.Items.Count + “<br>”);
     Response.Write(”Total Unread items = ” + oFldr.UnReadItemCount);
     foreach (Outlook.MailItem oMessage in oFldr.Items)
     {
         StringBuilder str = new StringBuilder();
         str.Append(”<table style=’border:1px solid gray;font-family:Arial;font-size:x-small;width:80%;’ align=’center’><tr><td style=’width:20%;’><b>Sender :</b></td><td>”);
         str.Append(oMessage.SenderEmailAddress.ToString() + “</td></tr>”);
         //basic info about message
         str.Append(”<tr><td><b>Date :</b></td><td>” + oMessage.SentOn.ToShortDateString() + “</td></tr>”);
         if (oMessage.Subject != null)
         {
             str.Append(”<tr><td><b>Subject :</b></td><td>” + oMessage.Subject.ToString() + “</td></tr>”);
         }
         //reference and save all attachments

         iAttachCnt = oMessage.Attachments.Count;
         if (iAttachCnt > 0)
         {
             for (int i = 1; i <= iAttachCnt; i++)
             {
                 str.Append(”<tr><td><b>Attachment(” + i.ToString() + “) :</b></td><td>” + oMessage.Attachments[i].FileName + “</td></tr>”);
             }
         }
         str.Append(”</table><br>”);
         Response.Write(str.ToString());

     }

 }
 catch (System.Exception ex)
 {
     Response.Write(”Execption generated:” + ex.Message);
 }
 finally
 {
     GC.Collect();
     oFldr = null;
     oNs = null;
     oOutlook = null;

 }

[CODE]

 

 

Create New Account
help
deploy 2003 vsto addin on outlook 2007 problem Outlook Hi, Have created and deployed successfully, an outlook vsto addin for 2003. But i am unable to install it on office 2007 for one of the machines as, it is unable to install O2003PIA as it also requires office sp2. Whenever i try to install offce sp2 it says product version not found. Is the files and folders for 2003 on the system. Is there something i am missing. Outlook Program Add-Ins Discussions Outlook 2003 (1) Outlook 2007 (1) Office (1) Word (1) VSTO (1) XP (1) NewInspectorEventHandler (1) SetTrackForReplyForward (1) A
reading outlook e mails through c# code Hi , i receive multiple mails containing the logs of various maintain these status in database. the basic aim is to read specific mails from my outlook. -Thanks In order to use the API from C#. Instead, do a search on C ll find code samples to retrieve your emails from your C# app and not involve Outlook at all. have a look at below article . . http: / / www.codeproject.com / KB / COM / Outlook_Express_Messages.aspx To access outlook emails and its contents like total number of emails in inbox, number of unread emails title of email, attachments of email etc. To acquire these, all you need is Interop.Outlook.dll . How to access outlook using ASP.NET is given below. You can write this code in a button click event or in page load event. The code part contains C# language: using Outlook; Outlook.Application oOutlook; Outlook.NameSpace oNs; Outlook.MAPIFolder oFldr; long iAttachCnt; try { oOutlook = new Outlook.Application