code: public function getMimeType($attachment) {
      $attachment = explode('.', basename($attachment));
      if (!isset($this->mimeTypes[strtolower($attachment[count($attachment) - 1])])) {
        pines_error('MIME Type not found.');
        return null;
      }
      return $this->mimeTypes[strtolower($attachment[count($attachment) - 1])];
    }
docs: Get MIME Type of attachment.
  
  @param string $attachment The attachment filename.
  @return mixed MIME type on success, null on failure.