public function setPreSendHandler($value) {
        if ($value !== null && !is_callable($value)) {
            throw new \Exception('A function is expected, or null.');
        }

        $this->preSendHandler = $value;
    }
public function setPreSendHandler($value) {
        if ($value !== null && !is_callable($value)) {
            throw new \Exception('A function is expected, or null.');
        }

        $this->preSendHandler = $value;
    }
public function setPreSendHandler ( $ value ) { if ( $ value !== null && ! is_callable ( $ value ) ) { throw new \ Exception ( 'A function is expected, or null.' ) ; } $ this -> preSendHandler = $ value ; }
Sets the event handler when calling the "preSend" method.

@param callback|null $value The function to set.

@return void
Sets the event handler when calling the preSend method .