postmark-php icon indicating copy to clipboard operation
postmark-php copied to clipboard

Sending a templated email with an empty model fails

Open smilledge opened this issue 8 years ago • 1 comments

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?

smilledge avatar Aug 24 '17 01:08 smilledge

I'm facing same problem when using sendEmailWithTemplate method with attach a file image

image But with

tdchien avatar Nov 04 '18 12:11 tdchien