src/MimeMailer/MimeMessage.php
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');
        }
    }
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');
        }
    }
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' ) ; } }
Initialization before sending messages

@return void
Initialization before sending messages