Mailgun Inspect: Your Email Pre-Send Quality Control Solution
Overview
Mailgun Inspect is an email pre-send quality control tool that ensures your emails are optimized for delivery, readability, and accessibility. By integrating Mailgun Inspect into your workflow, you can catch potential issues before they reach your recipients, saving time and improving your email campaigns' effectiveness.
Key Features
- Email Accessibility Testing: Ensure your emails comply with accessibility standards, such as WCAG, to make your content inclusive for all users.
- Email Previews: Generate previews of your email across various clients and devices to ensure a consistent and polished look.
- Link Validation: Verify the validity and status of links within your emails, ensuring recipients don't encounter broken or malicious URLs.
- Image Validation: Check image properties such as dimensions, size, and availability to avoid rendering issues in email clients.
Mailgun Inspect empowers developers and marketers to deliver emails that meet the highest standards of quality and accessibility.
Getting Started with the Mailgun Inspect API
Base URLs
Mailgun supports both US and EU regions. Use the appropriate base URL depending on where your domain is hosted:
Service | US Endpoint | EU Endpoint |
---|---|---|
REST API | api.mailgun.net | api.eu.mailgun.net |
Authentication
Authentication is handled via HTTP Basic Auth. Here's how it works:
- Username: api
- Password: Your API Key
How to Obtain an API Key
- Log in to your Mailgun Dashboard.
- Navigate to Account Settings > API Keys .
- Copy your Private API Key . Keep it secure, as it won’t be displayed again.
Example: Authentication with cURL
curl --user 'api:YOUR_API_KEY'
Example: Submitting an Accessibility Test
Send a POST request with the HTML content of your email for accessibility analysis.
curl --user 'api:YOUR_API_KEY' \
-X POST https://api.mailgun.net/v1/inspect/accessibility \
-H "Content-Type: application/json" \
-d '{
"html": "<html>Your email HTML content here</html>",
"encoded": false
}'