code: private function buildAttachmentPart() {
      if (count($this->attachments) > 0) {
        $attachment_part = '';
        foreach ($this->attachments as $attachment) {
          $file_str = chunk_split(base64_encode(file_get_contents($attachment)));
          $attachment_part .= "--MIME_BOUNDRY\nContent-Type: ".$this->getMimeType($attachment)."; name=".basename($attachment)."\nContent-disposition: attachment\nContent-Transfer-Encoding: base64\n\n{$file_str}\n\n";
        }
        return $attachment_part;
      }
    }
docs: Create attachments part of the message.
  
  @access private
  @return string The attachment section.