Where is the email attachments ?

If you need email attachments this sample may be helping for you.

Email attachments in the ActivityMimeAttachment entity. Other attachment in the Annotation entity (for default!)

Firstly get email


Entity emailEntity = service.Retrieve("email", new Guid(emailGuidId), new ColumnSet(true));

Here this


QueryExpression qExpression = new QueryExpression();

qExpression.ColumnSet = new ColumnSet(true);
qExpression.EntityName = ActivityMimeAttachment.EntityLogicalName;
qExpression.Criteria.AddFilter(new FilterExpression(LogicalOperator.And));
qExpression.Criteria.AddCondition(new ConditionExpression("ObjectId", ConditionOperator.Equal, emailEntity.Id.ToString()));

var attachments = service.RetrieveMultiple(qExpression);

#attachments, #email, #email-attachments

Advertisements