Új hozzászólás Aktív témák

  • radi8tor

    MODERÁTOR

    Kis segítség jól jönne, hogy akkor ezt mire módosítsam?

    public function send() {
    $this->_sendPhpMailer();
    }

    public function _send() {
    $this->_sendPhpMailer();

    if ($this->emailtemplate) {
    $data = get_object_vars($this);

    $this->emailtemplate->sent($data);
    }
    }

    private function _send() {
    if (!$this->to) {
    throw new \Exception('Error: E-Mail to required!');
    }

    if (!$this->from) {
    throw new \Exception('Error: E-Mail from required!');
    }

    if (!$this->sender) {
    throw new \Exception('Error: E-Mail sender required!');
    }

    if (!$this->subject) {
    throw new \Exception('Error: E-Mail subject required!');
    }

    if ((!$this->text) && (!$this->html)) {
    throw new \Exception('Error: E-Mail message required!');
    }

    foreach (get_object_vars($this) as $key => $value) {
    $this->adaptor->$key = $value;
    }

    $this->adaptor->send();
    }

    ⭐ Stella

Új hozzászólás Aktív témák