Finally showing some developer love by getting up our Stampr Engineering blog.
Check it out for all your stampr programming news. :)


#dc comics#dc#batman#batfam#bruce wayne#dick grayson#batfamily#tim drake#dc fanart



seen from United States

seen from United States

seen from Netherlands
seen from Malaysia
seen from Spain
seen from United States

seen from Netherlands

seen from Türkiye
seen from Canada
seen from United Kingdom

seen from United Kingdom
seen from Singapore
seen from Malaysia
seen from Denmark

seen from Türkiye

seen from Spain
seen from India
seen from Argentina

seen from Germany

seen from United States
Finally showing some developer love by getting up our Stampr Engineering blog.
Check it out for all your stampr programming news. :)
Creating a new Batch for Testing
Whenever you create a new mailing in stampr, it is immediately queued and prepped for mailing.
If you're looking for fast, efficient service this is great! However, if you're trying to do some testing... you probably don't want all the mailings you create to be sent out.
This tutorial will detail how to create a special Batch for you to use with testing.
What are Batches?
Batches are basically folders (or buckets) to attach to your mailings. All mailings must belong to a batch and can easily be looked up by batch.
Batch Statuses
Batches all have statuses. Currently, there are two:
hold
processing
Hold
When a batch status is set to hold, it prevents all mail assigned to that batch from being sent out.
This is perfect for testing because we can create mailings and they won't count towards your monthly send limit.
Processing
This is the default status for batches. All mail added to a batch in processing will immediately be sent out.
Potential Gotcha: If you're going from hold -> processing, switching to processing will trigger the mailings in that batch to send.
Creating Our Testing Batch
The PHP client includes two different implementations to send mail. The first is called "simple" and lets you send mail without thinking too much about it. The second is called "advanced".
The advanced implementation is what we'll be using to create our testing batch.
Here's a gist that demonstrates how to create our new batch with the status set to hold.
Using the Testing Batch
Use the Batch ID returned in the stampr Hello World, and all mailings you create will not be sent out.
Setting up the PHP stampr API client
This post covers the PHP stampr API client. You can see all of the available stampr API clients here.
Download the PHP client
If you don’t already have it, download and install composer: https://getcomposer.org/
Extract the client and open a command prompt
cd into the directory to install with: php composer.phar install
The composer install will create a vendor directory with a few dependencies. The PHP client leans heavily on Guzzle.
The Stampr client exists in src/Stampr. You can move these files if you wish.
Assuming you don't move them, you can get started with your script by including the following at the top of your file:
require 'vendor/autoload.php'; require 'src/Stampr/Stampr.php'; $stampr_login = "[email protected]"; $stampr_password = "your.stampr.password"; $endpoint = "https://stam.pr/api"; $stampr = new Stampr($stampr_login, $stampr_password, $endpoint);
That's it! You're ready to get started making calls