lib/mail/MailSettings.php
public function jsonSerialize()
    {
        return array_filter(
            [
                'bcc' => $this->getBccSettings(),
                'bypass_list_management' => $this->getBypassListManagement(),
                'footer' => $this->getFooter(),
                'sandbox_mode' => $this->getSandboxMode(),
                'spam_check' => $this->getSpamCheck()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
public function jsonSerialize()
    {
        return array_filter(
            [
                'bcc' => $this->getBccSettings(),
                'bypass_list_management' => $this->getBypassListManagement(),
                'footer' => $this->getFooter(),
                'sandbox_mode' => $this->getSandboxMode(),
                'spam_check' => $this->getSpamCheck()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
public function jsonSerialize ( ) { return array_filter ( [ 'bcc' => $ this -> getBccSettings ( ) , 'bypass_list_management' => $ this -> getBypassListManagement ( ) , 'footer' => $ this -> getFooter ( ) , 'sandbox_mode' => $ this -> getSandboxMode ( ) , 'spam_check' => $ this -> getSpamCheck ( ) ] , function ( $ value ) { return $ value !== null ; } ) ? : null ; }
Return an array representing a MailSettings object for the Twilio SendGrid API

@return null|array
Return an array representing a MailSettings object for the Twilio SendGrid API