public static function createFromJSON($json_obj)
    {
        $result = new self();
        foreach ($json_obj as $k => $v) {
            if ($k == "toAddresses") {
                $result->toAddresses = (array) $v->address;
            } else if ($k == "ccAddresses") {
                $result->ccAddresses = (array) $v->address;
            } else if ($k == "bccAddresses") {
                $result->bccAddresses = (array) $v->address;
            } else {
                $result->$k = $v;
            }
        }
        return $result;
    }