0 votes
by (290 points)
edited

I know this forum is specifically for Rebex products. However, my question pertain to both Rebex and EWS. I don't know Rebex very well. There is only ONE class of Attachment in REBEX, whereas in EWS it has 3 classes (Attachment, FileAttachment, ItemAttachment). I am trying to determing the equivalent of Rebex.Mail.Attachment to EWS.

  1. EWS Attachment represents an attachment of an item
  2. EWS FileAttachment represents a file attachment
  3. EWS ItemAttachment represents an item attachment.

My instinct said that Rebex.Mail.Attachment is the equivalent to EWS Attachment, but don't know why EWS has 3 classes.

Thank you.

Applies to: Rebex Secure Mail

1 Answer

+1 vote
by (147k points)
edited
 
Best answer

Actually, EWS has two types - FileAttachment and ItemAttachment. The third one - Attachment - is an abstract class they both inherit from. The difference between the first two is described fairly well at MSDN - an item attachment represents an attached EWS item, a file attachment represents an attached file. The Attachment base class is useful when you write code that is supposed to work with both item and file attachments.

In Rebex Secure Mail, the Attachment class covers both use cases - it can either be an attached file, or an attached e-mail message represented by a MailMessage object. So it can be said that Rebex.Mail.Attachment is equivalent to all the three EWS classes.

by (290 points)
edited

Lukas, thank you for a clear explanation.

...