Email message blank body


#1

so I have this issue with my email script. Everything goes through in my controller except the message in the email the body is blank, can anyone tell me what I am doing wrong?

$siteSettings = $this->SiteSettings->getSiteSettings();
        $receiptEmail=new Email();
        $receiptEmail->emailFormat('text');
        $receiptEmail->subject('Application Test Email');
        $receiptEmail->sender($siteSettings['email_from'],$siteSettings['email_from_name']);
        $receiptEmail->to("myemail@gmail.com");
       $receiptEmail->message("test Content");
        
        try{
        $receiptEmail->send();

        $this->set('title','test send');
        $response = $this->render(false);
        $response->body("test send");
        }catch(\Exception $e){
          $this->set('title','test send');
          $response = $this->render(false);
          $response->body($e->getMessage());  
        }

#2

disregard. The message part goes in the send function $receiptEmail->send(‘My Message’);