Skip to content

v2.0.0

Compare
Choose a tag to compare
@willpower232 willpower232 released this 24 Jul 11:54
· 8 commits to master since this release
027a340

A full rewrite to rely on the more common Guzzle client and apply tests. The minimum PHP version has been changed to 7.4.

This is not backwards compatible and you will need to change your code to use this new version

For sending a message, the changes are mostly as follows, from

use Postal\SendMessage;

$postalmessage = new SendMessage($client);
$response = $postalmessage->send();
$postal_email_id = $response->result->message_id;
foreach ($response->recipients() as $address => $message) {
    $postal_id = $message->id();
    $postal_token = $message->token();
}

to

use Postal\Send\Message as SendMessage;

$postalmessage = new SendMessage();
$response = $client->send->message($postalmessage);
$postal_email_id = $response->message_id;
foreach ($response->recipients() as $address => $message) {
    $postal_id = $message->id;
    $postal_token = $message->token;
}

However you should take a moment to have a look at 027a340 for the full details.

Kudos to @Josh-G for all the hard work here.