ทำงานกับ IBM Notes

เกี่ยวกับ IBM Notes

IBM Notes คือไคลเอนต์และ IBM Domino คือเซิร์ฟเวอร์ของแพลตฟอร์มซอฟต์แวร์แบบคลไอเอนต์‑เซิร์ฟเวอร์ที่ทำงานร่วมกัน IBM Notes มีฟีเจอร์การทำงานร่วมกันเช่น อีเมล ปฏิทิน รายการสิ่งต้องทำ การจัดการผู้ติดต่อ ฯลฯ ไฟล์ฐานข้อมูลที่ใช้โดย IBM Notes จะถูกบันทึกในรูปแบบ Notes Storage Facility (NSF)

ตรวจจับไฟล์ในรูปแบบ NSF

ตัวอย่างโค้ดด้านล่างจะแสดงวิธีตรวจจับรูปแบบไฟล์ NSF:

var formatType = FileFormatUtil.DetectFileFormat("storage.nsf").FileFormatType; // Returns FileFormatType.Nsf

อ่านข้อความจากไฟล์จัดเก็บ NSF

Aspose.Email ให้ NotesStorageFacility class เพื่ออ่านไฟล์จัดเก็บ NSF. The NotesStorageFacility class ให้ EnumerateMessages method ที่วนซ้ำข้อความในไฟล์จัดเก็บ NSF ตัวอย่างโค้ดต่อไปนี้แสดงการใช้ NotesStorageFacility class และ EnumerateMessages method เพื่ออ่านข้อความจากไฟล์จัดเก็บ NSF. 

// The path to the File directory.
string dataDir = RunExamples.GetDataDir_Email();

using (NotesStorageFacility nsf = new NotesStorageFacility(dataDir + "SampleNSF.nsf"))
{
    foreach (MailMessage eml in nsf.EnumerateMessages())
    {
        Console.WriteLine(eml.Subject);
    }
}