code: protected function _buildInit()
      {
          $this->clear('message');
      
          $this->getMailer()
              ->setRegistry('boundary', $this->makeBoundary())
              ->setRegistry('boundary_ctt', $this->makeBoundary());
      
          // message type
          if (strlen($this->text)>0 && count($this->attachment)>0) {
              $this->getMailer()->setRegistry('message_type', 'multipart/mixed');
          } elseif (strlen($this->text)>0 && strlen($this->html)>0 && count($this->attachment)==0) {
              $this->getMailer()
                  ->setRegistry('message_type', 'multipart/alternative')
                  ->setRegistry('boundary_ctt', $this->getMailer()->getRegistry('boundary'));
          } else {
              $this->getMailer()->setRegistry('message_type', 'text/plain');
          }
      }
docs: Initialization before sending messages
  
  @return void