lanlin/nylas-php

Sending drafts missing param 'tracking'

macoto-liu opened this issue · 3 comments

if you look at the official website, sending draft support 'tracking' param.

https://docs.nylas.com/reference#sending-drafts

Can we support it?

nvm, it's an optional param.

This still has a problem.

If I pass 'tracking' as part of the param. the sdk failed because of validation error.

image

I believe you have to add 'tracking' as part of the rules. see respect validation doc, extra field or missing field both cause validation failed.
https://respect-validation.readthedocs.io/en/2.0/rules/KeySet/#keyset

This is the snippet code we used in our project.

$params =
            [
                'version'  => $version,
                'draft_id' => $draftId,
                'tracking' => $tracking,
            ];

Drafts()->Sending()->sendDraft($params);