Version overrided when not duplicated in $options
MariusJam opened this issue · 2 comments
MariusJam commented
Hello,
When you do :
$mj = new \Mailjet\Client(getenv('MJ_APIKEY_PUBLIC'), getenv('MJ_APIKEY_PRIVATE'),true,['version' => 'v3.1']);
/* set body */
$mj->post(Resources::$Email, ['body' => $body], ['timeout' => 5]);
The POST request is sent to https://api.mailjet.com/v3/send and not https://api.mailjet.com/v3.1/send as expected. The $options array provided in post() method erases the version set previously.
I have this issue with at least v1.5.5 and v1.5.6 of the Mailjet PHP client.
oleksandr-mykhailenko commented
Hello @MariusJam
Issue was related and published in new version - https://github.com/mailjet/mailjet-apiv3-php/releases/tag/v1.5.7
MariusJam commented
Hello @oleksandr-mykhailenko,
Thanks for the quick fix ! The version 1.5.7 resolves the issue indeed.