public function setTextMessage(array $to,
                                   string $subject,
                                   string $body,
                                   array $attachment = null,
                                   array $cc = null,
                                   array $bcc = EMAIL_BCC): void
    {
        $this->email->setFrom($this->from);
        foreach ($to as $value) {
            $this->email->addTo($value);
        }
        if ($cc != null) {
            foreach ($cc as $value) {
                $this->email->addCc($value);
            }
        }
        if ($bcc != null) {
            foreach ($bcc as $value) {
                $this->email->addBcc($value);
            }
        }
        if ($attachment != null) {
            foreach ($attachment as $file) {
                $this->email->addAttachment($file);
            }
        }
        $this->email->setSubject($subject);
        $this->email->setBody($body);
    }
public function setTextMessage(array $to,
                                   string $subject,
                                   string $body,
                                   array $attachment = null,
                                   array $cc = null,
                                   array $bcc = EMAIL_BCC): void
    {
        $this->email->setFrom($this->from);
        foreach ($to as $value) {
            $this->email->addTo($value);
        }
        if ($cc != null) {
            foreach ($cc as $value) {
                $this->email->addCc($value);
            }
        }
        if ($bcc != null) {
            foreach ($bcc as $value) {
                $this->email->addBcc($value);
            }
        }
        if ($attachment != null) {
            foreach ($attachment as $file) {
                $this->email->addAttachment($file);
            }
        }
        $this->email->setSubject($subject);
        $this->email->setBody($body);
    }
public function setTextMessage ( array $ to , string $ subject , string $ body , array $ attachment = null , array $ cc = null , array $ bcc = EMAIL_BCC ) : void { $ this -> email -> setFrom ( $ this -> from ) ; foreach ( $ to as $ value ) { $ this -> email -> addTo ( $ value ) ; } if ( $ cc != null ) { foreach ( $ cc as $ value ) { $ this -> email -> addCc ( $ value ) ; } } if ( $ bcc != null ) { foreach ( $ bcc as $ value ) { $ this -> email -> addBcc ( $ value ) ; } } if ( $ attachment != null ) { foreach ( $ attachment as $ file ) { $ this -> email -> addAttachment ( $ file ) ; } } $ this -> email -> setSubject ( $ subject ) ; $ this -> email -> setBody ( $ body ) ; }
Prepare a plain text E-mail

@param array $to
@param string $subject
@param string $body
@param array|null $attachment
@param array|null $cc
@param array $bcc
Prepare a plain text E - mail