When sending emails via the API and providing your own HTML content (e.g., using dynamic content placeholders in the createEmailMessage
call), the content and structure of that HTML significantly impact deliverability. Spam filters analyze the final email, and issues within your custom HTML are a common reason for emails landing in the spam folder, especially after design changes.
Here's how to troubleshoot and prevent this:
- Review Your HTML: Carefully check the HTML code you pass in the API request. Look for common spam triggers:
- Excessive capitalization or punctuation (!!!)
- Spam-associated words ("free," "win," "urgent," etc.)
- Large images with minimal text content.
- Broken or overly complex HTML/CSS.
- Misleading or non-standard links.
- Hidden text.
- Test Before Sending: Use email preview and spam testing tools (like Litmus, Email on Acid, Mail-tester.com, etc.) to analyze your HTML before sending live campaigns via the API. These tools can identify rendering problems and potential spam filter flags across different email clients.
- Follow HTML Email Best Practices:
- Keep your code clean and simple.
- Ensure a good text-to-image ratio.
- Make sure your email is responsive and renders well on mobile devices.
- Include a clear plain-text version of your email.
- Check Links: Verify all URLs are correct, active, and point to reputable domains. Avoid using URL shorteners if possible. Ensure your unsubscribe link is prominent and functional.
- Monitor Sender Reputation: Use tools like Google Postmaster Tools or Microsoft SNDS to monitor your domain and IP reputation. Poor reputation can lead to spam placement regardless of content.
- Analyze API Payload: Ensure the structure of your API call is correct, and you are passing the HTML content in the intended parameter (e.g.,
dynamic_content_placeholders
). Double-check that the final rendered email looks as expected.
Example API Payload Snippet (Illustrative):
{
"notifications": [
{
"send_date": "now",
"email_template": "YOUR_TEMPLATE_ID", // Optional: Can be a basic template
"from": {
"name": "Your Sender Name",
"email": "sender@yourdomain.com"
},
"dynamic_content_placeholders": {
"main_html_content": "<!DOCTYPE html><html><head>...</head><body>... Your full email HTML ...</body></html>",
"unsubscribe_link_html": "<a href='{UnsubscribeURL}'>Unsubscribe</a>"
// Other placeholders as needed
},
"subject": [
{ "default": "Your Email Subject" }
]
// ... other parameters like conditions, etc.
}
],
"auth": "YOUR_API_TOKEN",
"application": "YOUR_APP_CODE"
}
By focusing on the quality and structure of the HTML content you provide via the API, you can significantly improve inbox placement.
Comments
0 comments
Article is closed for comments.