# Convert email templates to Mailtrap Handlebars

Migrating email templates between providers requires converting different template syntaxes. This skill automates the conversion from SendGrid, Mailgun, Mandrill, Postmark, Brevo, and Amazon SES to Mailtrap-compatible Handlebars format.

## Install

```bash
npx skillstore add mailtrap/converting-email-templates
```

## Metadata

- - Slug: mailtrap-converting-email-templates
- - Version: 1.0.0
- - Author: mailtrap
- - GitHub username: mailtrap
- - License: MIT
- - Repository: https://github.com/mailtrap/mailtrap-skills/tree/main/skills/converting-email-templates
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: low
- - Risk factors: scripts, filesystem, env\_access, external\_commands, network
- - Quality score: 81
- - Quality tier: silver
- - Public page: https://skillstore.pages.dev/skills/mailtrap-converting-email-templates
- - Manifest: https://skillstore.pages.dev/api/skills/mailtrap-converting-email-templates/manifest

## Capabilities

- Converts single email template files from supported providers to Handlebars syntax
- Processes entire directories of HTML template files in batch mode
- Converts inline HTML pasted directly in chat using LLM intelligence
- Flags unsupported patterns like date formatting and comparison helpers for manual review
- Generates conversion reports showing exactly what changed and what needs attention
- Maps API field names from the source provider to Mailtrap equivalents

## Use Cases

- Migrate a single email template: Convert one email template file from a supported provider to Mailtrap Handlebars format with a clear report of all changes.
- Batch migrate a template library: Process an entire directory of HTML templates in a single operation with a summary report and per-file flag details.
- Test inline template conversion: Paste raw template HTML directly into chat for instant conversion without saving files to disk first.

## Prompt Templates

### Convert a single template file

```
Convert the email template at path/to/template.html from SendGrid to Mailtrap Handlebars syntax.
```

### Batch convert a template directory

```
Convert all HTML email templates in the directory ./templates/ from Brevo to Mailtrap Handlebars. Show the summary report.
```

### Convert inline template HTML

```
Convert this Postmark email template to Mailtrap Handlebars: [paste template HTML here]
```

### Review flagged patterns

```
Review the flags from my Mandrill template conversion. Show me which patterns need application code changes and which can be fixed in the template.
```

## Limitations

- Cannot convert custom Handlebars helpers like formatDate, greaterThan, or lessThan
- Does not migrate template metadata such as names, categories, or tags
- Requires templates already exported as HTML from the source provider
- Cannot process directories containing templates from multiple providers at once

## Best Practices

- Export the raw HTML source from your provider before starting the conversion process
- Review all flagged patterns carefully as they often require application code changes
- Test converted templates in the Mailtrap preview tool before sending to recipients

## Anti Patterns

- Do not mix templates from different providers in the same input directory
- Do not skip flagged patterns - they contain syntax the converter cannot handle
- Do not attempt to convert custom Handlebars helpers in the template itself

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-03T15:01:26.694\+00:00
- - Summary: All 434 static analysis findings are false positives. The skill is a legitimate Mailtrap tool for converting email templates. The external\_commands findings are markdown documentation showing API endpoint references and shell command examples in code blocks. The network findings are references to docs.mailtrap.io and Mailtrap API endpoints in the documentation. The obfuscation findings are Handlebars template syntax \(double curly braces\) in documentation files. The Python converter script uses regex-based pattern substitution on template files - it reads HTML files, applies conversion rules, and writes output. The script does not make network requests, execute arbitrary code, or exfiltrate data. The documentation references environment variables for Mailtrap API tokens, which is expected for a tool that interacts with the Mailtrap platform. No prompt injection or malicious intent detected.

## Stats

- - Views: 0
- - Downloads: 0
- - Favorites: 0
- - Popularity score: 0
