-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example of how to fetch an emailmessage
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
require_once(__DIR__ . '/../autoload.php'); | ||
|
||
$messageBird = new \MessageBird\Client('YOUR_ACCESS_KEY'); // Set your own API access key here. | ||
|
||
try { | ||
$emailMessageResult = $messageBird->emailmessages->read('ca0a8220453bc36ddeb3115a37400870'); // Set a message id here | ||
var_dump($emailMessageResult); | ||
} catch (\MessageBird\Exceptions\AuthenticateException $e) { | ||
// That means that your accessKey is unknown | ||
echo 'wrong login'; | ||
} catch (\Exception $e) { | ||
var_dump($e->getMessage()); | ||
} |