ตั้งค่าหมวดสีสำหรับข้อความ Outlook

Aspose.Email - ตั้งค่าสีหมวดหมู่สำหรับข้อความ Outlook

Microsoft Outlook ให้ผู้ใช้กำหนดสีหมวดหมู่เพื่อแยกแยะอีเมล สีหมวดหมู่ทำเครื่องหมายอีเมลว่ามีความสำคัญหรืออยู่ในประเภทใด Aspose.Email ให้คุณสมบัติเช่นเดียวกันผ่าน FollowUpManager คลาสนี้ ความสามารถต่อไปนี้สนับสนุนโดยคลาสนี้:

  • AddCategory() รับ MapiMessage และสตริงสีหมวดหมู่เป็นอาร์กิวเมนต์
  • removeCategory() รับอาร์กิวเมนต์เป็น MapiMessage และสตริงสีหมวดหมู่ที่จะลบออกจากข้อความ
  • clearCategories() ใช้ลบสีหมวดหมู่ทั้งหมดจากข้อความ
  • getCategories() ใช้ดึงสีหมวดหมู่ทั้งหมดจากข้อความใดข้อความหนึ่ง

Java


 MapiMessage msg = MapiMessage.fromFile(dataDir + "message.msg");

// Add category

FollowUpManager.addCategory(msg, "Purple Category");

// Add another category

FollowUpManager.addCategory(msg, "Red Category");

// Retrieve the list of available categories

IList categories = FollowUpManager.getCategories(msg);

// Remove the specified category

FollowUpManager.removeCategory(msg, "Red Category");

// Clear all categories

//FollowUpManager.clearCategories(msg);

msg.save(dataDir + "AsposeCategories.msg");

ดาวน์โหลดโค้ดที่ทำงาน

ดาวน์โหลดโค้ดตัวอย่าง