Postman + plop.email
Build and test email workflows in Postman. Perfect for API exploration, testing, and documentation.
Postman DocumentationFeatures
Collection Workflows
Chain requests: trigger email → fetch → verify content.
Environment Variables
Store API keys and test emails securely.
Newman CLI
Run Postman collections in CI/CD with Newman.
Pre-request Scripts
Generate unique emails dynamically.
Setup
// 1. Create a Postman Environment with:
{
"PLOP_API_KEY": "your_api_key",
"PLOP_BASE_URL": "https://api.plop.email/v1",
"TEST_MAILBOX": "postman"
}
// 2. Add Pre-request Script to generate unique emails:
const timestamp = Date.now();
pm.environment.set("TEST_EMAIL",
`${pm.environment.get("TEST_MAILBOX")}+${timestamp}@in.plop.email`
);Basic Request
Fetch the latest email from a mailbox.
Basic Requesttypescript
// GET Request
{{PLOP_BASE_URL}}/messages/latest?to={{TEST_EMAIL}}
// Headers
Authorization: Bearer {{PLOP_API_KEY}}
// Tests tab
pm.test("Email received", function () {
pm.response.to.have.status(200);
const email = pm.response.json();
pm.expect(email.subject).to.include("Welcome");
});Multi-Step Email Workflow
Complete email testing workflow in a collection.
Multi-Step Email Workflowtypescript
// Collection Structure:
// 1. Trigger Signup (POST to your API)
// 2. Wait for Email (with retry)
// 3. Verify Email Content
// 4. Extract and Test Magic Link
// Request 2: Fetch Email (with retry script)
// Pre-request Script:
const maxRetries = 5;
const retryDelay = 2000;
let currentRetry = pm.environment.get("retryCount") || 0;
if (currentRetry > 0) {
console.log(`Retry attempt ${currentRetry} of ${maxRetries}`);
}
// Tests tab (with retry logic):
const response = pm.response.json();
if (response.error && pm.environment.get("retryCount") < 5) {
const retryCount = parseInt(pm.environment.get("retryCount") || "0") + 1;
pm.environment.set("retryCount", retryCount);
setTimeout(() => {
postman.setNextRequest(pm.info.requestName);
}, 2000);
} else {
pm.environment.unset("retryCount");
pm.test("Email received", () => {
pm.expect(response.subject).to.exist;
});
}Tips
- Use Collection Runner for repeatable email test workflows
- Store sensitive data in Environments, not in collections
- Use Newman for CI/CD integration: newman run collection.json -e env.json
- Add delays between requests for email delivery time
Related Use Cases
Start testing with Postman
Add email verification to your Postman tests in minutes.