postmark-php
postmark-php copied to clipboard
Sending a templated email with an empty model fails
Calling sendEmailWithTemplate() with an empty model (eg array(), null, etc) fails with a Received valid, but incompatible JSON input error.
Would be nice if empty models were removed from the request. The error is kinda misleading as the JSON isn't actually invalid.
At the moment I'm just sending a template model of array('empty' => '') to get around the error as there doesn't seem to be a way to send an empty model?
I'm facing same problem when using sendEmailWithTemplate method with attach a file

But with