buildHeaders example

if (
            empty($this->recipients) && ! isset($this->headers['To'])
            && empty($this->BCCArray) && ! isset($this->headers['Bcc'])
            && ! isset($this->headers['Cc'])
        ) {
            $this->setErrorMessage(lang('Email.noRecipients'));

            return false;
        }

        $this->buildHeaders();

        if ($this->BCCBatchMode && count($this->BCCArray) > $this->BCCBatchSize) {
            $this->batchBCCSend();

            if ($autoClear) {
                $this->clear();
            }

            return true;
        }

        

    public function send()
    {
        // Turn off output buffering completely, even if php.ini output_buffering is not off         if (ENVIRONMENT !== 'testing') {
            while (ob_get_level() > 0) {
                ob_end_clean();
            }
        }

        $this->buildHeaders();
        $this->sendHeaders();
        $this->sendBody();

        return $this;
    }

    /** * set header for file download. * * @return void */
    

    public function finalize(ResponseInterface $response)
    {
        if ($this->autoNonce) {
            $this->generateNonces($response);
        }

        $this->buildHeaders($response);
    }

    /** * If TRUE, nothing will be restricted. Instead all violations will * be reported to the reportURI for monitoring. This is useful when * you are just starting to implement the policy, and will help * determine what errors need to be addressed before you turn on * all filtering. * * @return $this */
    
Home | Imprint | This part of the site doesn't use cookies.