How to read emails from *.pst file in c#
HI. I want to read emails from *.pst without connecting Outlook or other applications.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hussam BarouqaRank #6,374 · 268 reputationPosted Jan 4, 2018, 5:55 AM EST
Uehara AyakaRank #2,730 · 512 reputationPosted Jan 4, 2018, 10:34 PM EST
Sagar Pandurang KapRank #606 · 4K reputationPosted Jan 3, 2018, 12:49 AM EST
you need to first add refrence to the page Microsoft.Office.Interop.Outlook;
Outlook.Application olApp = new Outlook.ApplicationClass();
olApp.Session.AddStore(“PST path here”);
Outlook.MAPIFolder folder = OlApp.Getnamespace(“MAPI”).Folders.GetLast();
Outlook.Items items = folder.items;
foreach (Outlook.MailItem item in folder.items)
Hope it helps..{
Console.WriteLine(item.SenderEmailAddress + ” ” + item.Subject + “\n” + item.Body);
}