Message Playground
Use this interactive playground to experiment with Nodemailer message configuration and see a live preview of how your email will appear to recipients.
Switch between the Editor tab to modify the JSON configuration and the Preview tab to see how your email will render. The playground supports all common message fields including from, to, cc, bcc, subject, text, and html.
- Editor
- Preview
Hello from Nodemailer!
Supported fields
The playground supports the following message configuration fields:
| Field | Description |
|---|---|
from | Sender address (string or object with name and address) |
to | Recipient address(es) - string, array, or object |
cc | Carbon copy recipient(s) |
bcc | Blind carbon copy recipient(s) |
replyTo | Reply-to address(es) |
subject | Email subject line |
text | Plain text message body |
html | HTML message body (takes precedence over text) |
attachments | Array of attachment objects (see limitations below) |
If you only provide a text field without html, the playground will automatically convert the plain text to a simple HTML representation for preview purposes.
The playground only supports attachments with base64-encoded content. Other content sources (file paths, URLs, streams, buffers) are not available in the browser environment. Each attachment must include:
content- Base64-encoded stringencoding- Must be set to"base64"filename- Name of the filecontentType- MIME type (optional, detected from filename if omitted)cid- Content-ID for embedding images in HTML (optional)
Attachments with a cid value can be referenced in HTML using <img src="cid:your-cid-value">.
Address formats
You can specify email addresses in several formats:
// Plain email address
"to": "recipient@example.com"
// With display name
"to": "\"Recipient Name\" <recipient@example.com>"
// Object format
"to": { "name": "Recipient Name", "address": "recipient@example.com" }
// Multiple recipients (array)
"to": ["user1@example.com", "user2@example.com"]
// Multiple recipients (comma-separated)
"to": "user1@example.com, user2@example.com"
For more details on message configuration, see the message configuration reference.