/**
  * @return bool
  */
 function IsMimePartTextBody()
 {
     if ($this->Headers == null || $this->Headers->Count() == 0) {
         return true;
     }
     $contType = strtolower($this->GetContentType());
     $contDist = $this->GetDisposition();
     if (!$contType) {
         return false;
     }
     $contentTypeHeader = new HeaderParameterCollection($contType);
     $contentDispositionHeader = $contDist ? new HeaderParameterCollection($contDist) : null;
     if ($contentDispositionHeader) {
         $attach = $contentDispositionHeader->GetByName(MIMEConst_AttachmentLower);
         $filename = $contentDispositionHeader->GetByName(MIMEConst_FilenameLower);
     } else {
         $attach = $filename = null;
     }
     $name = $contentTypeHeader ? $contentTypeHeader->GetByName(MIMEConst_NameLower) : null;
     if ($attach != null || $filename != null || $name != null) {
         return false;
     }
     $filenameVal = $filename ? $filename->Value : '';
     $nameVal = $name ? $name->Value : '';
     if (strlen($filenameVal) != 0 || strlen($nameVal) != 0) {
         return false;
     }
     if (strpos($contType, MIMETypeConst_TextHtml) !== false || strpos($contType, MIMETypeConst_TextPlain) !== false) {
         return true;
     }
     return false;
 }