because the body may recognized as an attachment, so, we need a function to determine whether an attachment is the body or not. I make the following function:
public bool NotAttachment
{
get
{
if (_contentDisposition==null||_contentType==null)
return true;
else
return (_contentDisposition.IndexOf("attachment")==-1 && _contentType.IndexOf("text/plain")!=-1);
}
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
because the body may recognized as an attachment, so, we need a function to determine whether an attachment is the body or not. I make the following function:
public bool NotAttachment
{
get
{
if (_contentDisposition==null||_contentType==null)
return true;
else
return (_contentDisposition.IndexOf("attachment")==-1 && _contentType.IndexOf("text/plain")!=-1);
}
}