Guest User

Untitled

a guest
Oct 18th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. SPEmailAttachmentCollection attachColl = emailMessage.Attachments;
  2. string AttachedFiles = string.Empty;
  3. int TotalAttachments = 0;
  4. foreach (SPEmailAttachment attach in attachColl)
  5. {
  6. AttachedFiles += attach.FileName + ";";
  7. TotalAttachments ++;
  8. }
  9.  
  10. SPItem item = file.Item;
  11. item["TotalAttachments"] = TotalAttachments.ToString();
  12. item["AttachedFiles"] = AttachedFiles.ToString();
  13. item.Update();
  14. list.Update();
Add Comment
Please, Sign In to add comment