src/NotifierEmailPhpMailerService.php
private function _bootstrapMailMessage($messageId){
       //validate that the message exists
        if(!isset($this->messages[($messageId)])){
            throw new NotifierEmailException("Illegal attempt to bootstrap a message that doesnt exist");
        }
        
        //clear the mailHandler
        $this->mailHandler->clearAddresses();
        $this->mailHandler->clearAllRecipients();
        $this->mailHandler->clearAttachments();
        $this->mailHandler->clearBCCs();
        $this->mailHandler->clearCCs();
        $this->mailHandler->clearCustomHeaders();
        $this->mailHandler->clearReplyTos();
        $this->mailHandler->AltBody = "";
        $this->mailHandler->Timeout = 120;
        
        //begin bootstrapping the message
        
        //add receipients on main address
        foreach($this->messages[($messageId)]["TO"] as $emailUser){
            $this->mailHandler->AddAddress($emailUser["email"], $emailUser["name"]);
        }
        
        //add recepients on CC
        foreach($this->messages[($messageId)]["CC"] as $emailUser){
            $this->mailHandler->addCC($emailUser["mail"], $emailUser["name"]);
        }
        
        //add the subject
        $this->mailHandler->Subject = $this->messages[($messageId)]["SUBJECT"];
        
        //add the email altbody
        $this->mailHandler->AltBody = $this->messages[($messageId)]["ALT_BODY"];

        //set the message body (as HTML)
        $this->mailHandler->MsgHTML($this->messages[($messageId)]["MSG_HTML"]);
                
        //set the bootstrapped property to true
        $this->messages[($messageId)]["IS_BOOSTRAPPED"] = true;
    }
private function _bootstrapMailMessage($messageId){
       //validate that the message exists
        if(!isset($this->messages[($messageId)])){
            throw new NotifierEmailException("Illegal attempt to bootstrap a message that doesnt exist");
        }
        
        //clear the mailHandler
        $this->mailHandler->clearAddresses();
        $this->mailHandler->clearAllRecipients();
        $this->mailHandler->clearAttachments();
        $this->mailHandler->clearBCCs();
        $this->mailHandler->clearCCs();
        $this->mailHandler->clearCustomHeaders();
        $this->mailHandler->clearReplyTos();
        $this->mailHandler->AltBody = "";
        $this->mailHandler->Timeout = 120;
        
        //begin bootstrapping the message
        
        //add receipients on main address
        foreach($this->messages[($messageId)]["TO"] as $emailUser){
            $this->mailHandler->AddAddress($emailUser["email"], $emailUser["name"]);
        }
        
        //add recepients on CC
        foreach($this->messages[($messageId)]["CC"] as $emailUser){
            $this->mailHandler->addCC($emailUser["mail"], $emailUser["name"]);
        }
        
        //add the subject
        $this->mailHandler->Subject = $this->messages[($messageId)]["SUBJECT"];
        
        //add the email altbody
        $this->mailHandler->AltBody = $this->messages[($messageId)]["ALT_BODY"];

        //set the message body (as HTML)
        $this->mailHandler->MsgHTML($this->messages[($messageId)]["MSG_HTML"]);
                
        //set the bootstrapped property to true
        $this->messages[($messageId)]["IS_BOOSTRAPPED"] = true;
    }
function _bootstrapMailMessage() - Bootstrap a message for sending, clearing previous settings

@param   $messageId  - The message Id

@return void