public function format() {

        /*         * Add the mandatary props* */
        if (!is_null($this->locale)) {
            $result[self::LOCALE_KEY] = $this->locale;
        }

        if (!is_null($this->sender)) {
            $result[self::SENDER_KEY] = $this->sender;
        }

        if (!is_null($this->senderEmail)) {
            $result[self::SENDEREMAIL_KEY] = $this->senderEmail;
        }
        if (!is_null($this->subject)) {
            $result[self::SUBJECT_KEY] = $this->subject;
        }
        if (!is_null($this->contactsListID)) {
            $result[self::CONTACTLISTID_KEY] = $this->contactsListID;
        }
        /*         * Add the optional props if any* */
        if (!is_null($this->optionalProperties)) {
            $result = array_merge($result, $this->optionalProperties);
        }


        return $result;
    }