Article Preview
Overview
Mailgun’s Email Templates feature allows you to create, store, and manage reusable email layouts directly within your Mailgun account. By using templates, you can centralize your email workflow, reduce development overhead, and ensure a consistent design across your messages. Simply create a template, and then reference it by name or its unique ID when sending.
A key feature of our templating system is the ability to use variables. This allows you to personalize the content for each recipient by passing dynamic data, such as names or order details, in your API call.
Template Scopes: Account-Level vs. Domain-Level
Mailgun provides two different scopes for your templates, giving you the flexibility to manage them in a way that best suits your sending needs.
Account-Level Templates
This is the most flexible option. Account-level templates are created centrally on your Mailgun account and can be used to send emails from any of your sending domains. They can also be used on behalf of your subaccounts, making them ideal for managing a consistent brand identity across your entire account structure.
Domain-Level Templates
These templates are tied to a specific sending domain. When you create a domain-level template, it can only be used for emails sent from that particular domain. This is useful if you need to maintain distinct branding or layouts for different domains within the same account.
Usage Limits
To ensure optimal performance, the following limits apply:
- Account-level templates: Up to 100 templates and 40 versions per template.
- Domain-level templates: The same limits apply, but on a per-domain basis.
Templates can be found in the left-hand navigation pane as one of the suboptions under the Sending option:
Once you have clicked the Templates suboption, click the Create template button, select your template scope (account or domain level) and choose from a set of default templates to get started!
Mailgun Templates allows you to design your own or build off of a pre-existing template we have available to then save and send with the API.
Mailgun Templates are great for either transactional messages or marketing messages! For instance, transactional messages such as Email Receipts for Orders or marketing messages such as Bulk Messages or Newsletters.
For more information regarding how to use Mailgun Templates with our API, please be sure to check out our User Manual and API documentation for both Domain-level and Account-level Templates APIs.
Need Support?
Our Support Team here at Sinch Mailgun is happy to help! Reach out to us in the Support page of your Mailgun Control Panel, and we'll be with you shortly!