This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/document-engine/file-management/convert-email-files.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Convert EML and MSG files to PDF with Document Engine

Document Engine supports converting email files such as EML and MSG to PDF. As of Document Engine 1.16.0, you can also control the language and timezone used when rendering email headers and timestamps.

Email conversion options

When you convert an email file through the Build API, you can set these file-part options. These options are supported only for email files (EML and MSG):

  • email_language — A BCP 47 language tag used for translated email header labels and date/time formatting.
  • email_timezone — An IANA timezone name used for rendering email timestamps.

If you omit these options:

  • email_language defaults to en-US
  • email_timezone defaults to UTC

Example: Convert an email with default English formatting

{
"parts": [
{
"file": "email",
"email_language": "en-US",
"email_timezone": "UTC"
}
]
}

This renders labels such as From, To, and Subject, and it formats timestamps in UTC.

Example: Convert an email with German formatting

{
"parts": [
{
"file": "email",
"email_language": "de-DE",
"email_timezone": "Europe/Prague"
}
]
}

This renders labels such as Von, An, and Betreff, and it formats timestamps using the Prague timezone.

Example request

Use the email file as a normal Build API file part and add the email-specific options:

Terminal window
curl -X POST http://localhost:5000/api/build \
-H "Authorization: Token token=<API token>" \
-F email=@/path/to/example.eml \
-F instructions='{
"parts": [
{
"file": "email",
"email_language": "de-DE",
"email_timezone": "Europe/Prague"
}
]
}' \
-o result.pdf

For supported email file types, refer to the file type support guide.