TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
NJ Bhanushali
NA
13
15.7k
How to get filesize from attachment in Exchange 2007?
Aug 21 2015 12:32 AM
Hello,
if (email.HasAttachments)
{
AttachmentList AttachmentFiles = new AttachmentList(); //class for attachment list
foreach (Attachment attachment in email.Attachments)
{
if (attachment is FileAttachment)
{
FileAttachment fileAttachment = attachment as FileAttachment;
attachmentEntity.MailID = MailID;
attachmentEntity.Filename = fileAttachment.FileName;
attachmentEntity.FileSize = fileAttachment.Size;
attachmentEntity.File = fileAttachment.Content;
attachmentEntity.CreatedDate = fileAttachment.LastModifiedTime;
AttachmentFiles.Add(attachmentEntity);
}
}
}
I got following error. The property Last Modified Time and Size are valid only for Exchange Exchange 2010 or later versions.
How to get filesize and LastupdateTime from attachment in Exchange Server 2007 email account?
Reply
Answers (
2
)
when i try to make a report the app crash
Creating Chart Programmatically