public function sendMail(): void
    {
        if ($this->use_smtp) {
            $mailer = new SmtpMailer([
                'host' => $this->email_host,
                'username' => $this->email_username,
                'password' => $this->email_password,
                'secure' => $this->email_security
            ]);
        } else {
            $mailer = new SendmailMailer();
        }
        $mailer->send($this->email);
    }
public function sendMail(): void
    {
        if ($this->use_smtp) {
            $mailer = new SmtpMailer([
                'host' => $this->email_host,
                'username' => $this->email_username,
                'password' => $this->email_password,
                'secure' => $this->email_security
            ]);
        } else {
            $mailer = new SendmailMailer();
        }
        $mailer->send($this->email);
    }
public function sendMail ( ) : void { if ( $ this -> use_smtp ) { $ mailer = new SmtpMailer ( [ 'host' => $ this -> email_host , 'username' => $ this -> email_username , 'password' => $ this -> email_password , 'secure' => $ this -> email_security ] ) ; } else { $ mailer = new SendmailMailer ( ) ; } $ mailer -> send ( $ this -> email ) ; }
Use this after your E-mail has been prepared
Use this after your E - mail has been prepared