# EmailUX Gmail HTML Inserter (Chrome Extension) Source: https://docs.emailux.com/addins/gmail-html-inserter Paste and insert HTML directly into Gmail compose using the EmailUX Chrome extension. The **EmailUX Gmail HTML Inserter** is a Chrome extension that lets you paste HTML and insert it directly into a Gmail compose window. Perfect for sending designed templates, announcements, or any custom HTML content through Gmail. *** ## How It Works 1. Install the Chrome extension named **"EmailUX HTML Inserter"** from the Chrome Web Store. 2. Open Gmail and click **Compose** to start a new email. 3. In the compose window, you will see an option labeled **EmailUX Insert HTML**. 4. Paste your HTML into the provided input. 5. Click **Insert HTML**. 6. Your HTML will be inserted into the email body instantly. *** ## What You Can Use It For * Sending HTML email templates * Adding formatted announcements * Using EmailUX-designed templates * Sending custom layouts inside Gmail *** ## Support If you need help or have any questions, visit our support page: πŸ‘‰ **[https://www.emailux.com/support](https://www.emailux.com/support)** We’re happy to assist you. # EmailUX Outlook HTML Import Add-in Source: https://docs.emailux.com/addins/outlook-html-import How to use Outlook HTML Import Add-in The **EmailUX Outlook HTML Import Add-in** allows you to easily paste HTML code and insert it directly into a new Outlook email. This is useful when you want to send designed templates, announcements, or any custom HTML content through Outlook. *** ## How It Works 1. Install the add-in in Outlook. 2. Open a new email. 3. On the right side, open **EmailUX Outlook HTML Import**. 4. Paste your HTML into the box. 5. Click **Insert HTML**. 6. Your HTML will appear instantly inside the email body. *** ## What You Can Use It For * Sending HTML email templates * Adding formatted announcements * Using EmailUX-designed templates * Sending custom layouts inside Outlook *** ## Support If you need help or have any questions, visit our support page: πŸ‘‰ **[https://www.emailux.com/support](https://www.emailux.com/support)** We’re happy to assist you. # API client (@emailux/api-client) Source: https://docs.emailux.com/api/api-client TypeScript client for EmailUX render and deliver APIs. The [`@emailux/api-client`](https://www.npmjs.com/package/@emailux/api-client) package calls the EmailUX HTTP API: **`render`** (HTML by template) and **`deliver`** (render + send via a provider). ## Installation ```sh npm theme={null} npm install @emailux/api-client ``` ```sh yarn theme={null} yarn add @emailux/api-client ``` ```sh pnpm theme={null} pnpm add @emailux/api-client ``` ```sh bun theme={null} bun add @emailux/api-client ``` ## Default base URL All requests use: `https://render.emailux.com` Override with `baseUrl` in the client options if you use a custom deployment. **OpenAPI (Swagger):** The live spec for your deployment is at **`{baseUrl}/swagger.json`** (for example [`https://render.emailux.com/swagger.json`](https://render.emailux.com/swagger.json)). Use it for the latest paths, headers, bodies, and response codes. ## Client options | Option | Description | | --------------------- | ----------------------------------------------------------------------------------------------- | | `apiKey` | Required. Sent as `x-api-key`. | | `baseUrl` | Optional. Defaults to `https://render.emailux.com` (trailing slash is stripped). | | `defaultLocale` | Optional. Default `en-US`; used when `locale` is omitted on `deliver` / `render`. | | `fetchImplementation` | Optional. Custom `fetch` (e.g. for tests or edge runtimes). | | `timeoutMs` | Optional. Request timeout via `AbortSignal`. | | `provider` | One of `sendgrid`, `gmail`, or `smtp`. Affects **deliver** defaults (see below). | | `sendgridDomain` | Required when using SendGrid (default provider). Your SendGrid-authenticated domain identifier. | **Render** in this package is only supported with a **SendGrid domain** configured (`sendgridDomain` is required for `render()`). Delivery can use **SendGrid**, **Gmail**, or **SMTP** via `provider` and optional per-call overrides. **HTTP mapping:** The client sends your domain as the `x-sendgrid-domain` header on render/deliver. The public API may also document this as `x-domain`; behavior depends on your EmailUX API version. ## `render()` β€” HTML only Calls `POST /v1/render` with a JSON body: * `experience_id` (required) * `version` (optional) * `locale` (optional; falls back to `defaultLocale`) * `data` (object; defaults to `{}`) ### Response codes (`/v1/render`) | Status | Meaning | | ------ | ----------------------------------------------- | | `200` | Success. JSON includes `ok`, `html`, `subject`. | | `400` | Validation error | | `401` | Unauthorized | | `404` | Not found | On success, the client returns `{ ok: true, status, html?, subject? }`. On failure, `{ ok: false, status, error }` with `error.message` and optional `error.body`. ### Example (SendGrid domain β€” required for render) ```ts theme={null} import { EmailUxApiClient } from '@emailux/api-client'; const client = new EmailUxApiClient({ apiKey: process.env.EMAILUX_API_KEY!, sendgridDomain: 'mail.yourdomain.com', // your EmailUX / SendGrid domain }); const result = await client.render({ experienceId: 'welcome-email', version: 1, locale: 'en-US', data: { firstName: 'Ada' }, }); if (result.ok) { console.log(result.subject, result.html?.slice(0, 200)); } else { console.error(result.status, result.error); } ``` ## `deliver()` β€” render and queue send Calls `POST /v1/deliver` with a JSON body: * `experience_id` (required) * `tenant` β€” not set by this client; use API keys and headers if your backend requires it when `x-domain` is omitted (see `swagger.json` for your deployment). * `version`, `locale` (optional) * `channel_data` (required): `toEmail`, `fromEmail`, optional `toEmailName`, `fromEmailName` * `data` (object; defaults to `{}`) Optional headers the client may send: * `x-provider`: `gmail` or `smtp` when using those providers (SendGrid uses the domain header path, so `x-provider` is omitted for SendGrid). ### Response codes (`/v1/deliver`) | Status | Meaning | | ------ | --------------------------------------- | | `200` | Success. JSON includes `ok`, `message`. | | `400` | Validation error | | `401` | Unauthorized | | `404` | Not found | | `502` | Provider error | ### SendGrid Default provider is SendGrid; `sendgridDomain` is required on the client. ```ts theme={null} import { EmailUxApiClient } from '@emailux/api-client'; const client = new EmailUxApiClient({ apiKey: process.env.EMAILUX_API_KEY!, provider: 'sendgrid', sendgridDomain: 'mail.yourdomain.com', }); const result = await client.deliver({ experienceId: 'order-confirmation', channelData: { toEmail: 'customer@example.com', toEmailName: 'Customer', fromEmail: 'orders@yourdomain.com', fromEmailName: 'Your Store', }, data: { orderId: '12345' }, }); if (result.ok) { console.log(result.message); } else { console.error(result.status, result.error); } ``` You can omit `provider: 'sendgrid'`; the client still requires `sendgridDomain` for that configuration. ### Gmail ```ts theme={null} import { EmailUxApiClient } from '@emailux/api-client'; const client = new EmailUxApiClient({ apiKey: process.env.EMAILUX_API_KEY!, provider: 'gmail', }); const result = await client.deliver({ experienceId: 'order-confirmation', channelData: { toEmail: 'customer@example.com', fromEmail: 'noreply@yourdomain.com', }, data: { orderId: '12345' }, }); ``` Per-call override: ```ts theme={null} await client.deliver({ ...params, provider: 'gmail', }); ``` ### SMTP ```ts theme={null} import { EmailUxApiClient } from '@emailux/api-client'; const client = new EmailUxApiClient({ apiKey: process.env.EMAILUX_API_KEY!, provider: 'smtp', }); const result = await client.deliver({ experienceId: 'order-confirmation', channelData: { toEmail: 'customer@example.com', fromEmail: 'noreply@yourdomain.com', }, data: { orderId: '12345' }, }); ``` ## Errors and non-HTTP failures * HTTP `4xx` / `5xx` responses set `ok: false` and include `status` and `error` (with parsed body when JSON). * Network timeouts, aborts, or other thrown errors surface as `ok: false`, `status: 0`, and `error.message` from the thrown error. ## Requirements Node.js **>= 18** (native `fetch`). ## Source and license Package source lives under [`packages/api-client`](https://github.com/iClasser/emailux/tree/main/packages/api-client) in the EmailUX monorepo. License: MIT. # A component Source: https://docs.emailux.com/components/a Create A component ## 1. Install dependencies Install the EmailUX Email package locally and a few components. ```bash theme={null} # pnpm pnpm add @emailux/components # npm npm install @emailux/components # yarn yarn add @emailux/components ``` ## 2. Usage ```tsx theme={null} import { A } from "@emailux/a"; export default function EmailTemplate() { return <> Docs } ``` ## Props | Name | Type | Required | Default | Description | | ------------ | ------------------- | -------- | --------------------- | ------------------------------------------------------------------- | | children | any | No | | | | dir | "ltr" \| "rtl" | No | "ltr" | Text direction for the content | | color | string | No | | Hex color | | noDecoration | boolean | No | false | | | style | React.CSSProperties | No | | | | rel | string | No | 'noopener noreferrer' | | | spacing | string | No | - | Spacing bottom, and the anchor tag will be a block component if set | # Badge component Source: https://docs.emailux.com/components/badge Create Badge tag ## 1. Install dependencies Install the EmailUX Email package locally and a few components. ```bash theme={null} # pnpm pnpm add @emailux/components # npm npm install @emailux/components # yarn yarn add @emailux/components ``` ## 2. Usage ```tsx theme={null} import { Badge } from "@emailux/components"; export default function EmailTemplate() { return <> Text } ``` ## Props | Name | Type | Required | Default | Description | | | --------- | --------------- | -------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------- | - | | children | React.ReactNode | string | Yes | β€” | - | | dir | "ltr" \| "rtl" | No | Comes from wrapping `Html` component's `dir` context prop which is `ltr` | Text direction for the wrapper cell | | | spacing | string | No | Comes from wrapping `Html` component's `defaultSpacing` context prop which is `20px` | Spacing bottom, by default comes from `Html` defaultSpacing prop | | | varient | string | No | `default` | β€” | | | padding | string | No | `6px 8px` | inside padding | | | noPadding | boolean | No | false | β€” | | # Body component Source: https://docs.emailux.com/components/body Create Body wrapper tag ## 1. Install dependencies Install the EmailUX Email package locally and a few components. ```bash theme={null} # pnpm pnpm add @emailux/components # npm npm install @emailux/components # yarn yarn add @emailux/components ``` ## 2. Usage ```tsx theme={null} import { Body } from "@emailux/components"; export default function EmailTemplate() { return Some title ; } ``` ## Props | Name | Type | Required | Default | Description | | ----------------------- | ------------------- | -------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | children | React.ReactNode | Yes | β€” | Content of the email document | | dir | "ltr" \| "rtl" | No | Comes from wrapping `Html` component's `dir` context prop which is `ltr` | Text direction | | background | string | Yes | β€” | β€” | | backgroundColor | string | Yes | β€” | β€” | | style | React.CSSProperties | No | - | - | | width | number or "100%" | No | β€” | width of container | | padding | string | No | `12px 20px` | inner padding | | outerBgColor | string | No | β€” | When whidth is not `100%` and a number, you can set this value as Hex color value to set the left and right side of the section background color, not the inside | | borderRadius | string | No | | | | footer | React.ReactNode | No | | | | footerWidth | number or "100%" | No | β€” | width of footer | | footerPadding | string | No | `0px 20p` | footer padding | | footerOuterBgColor | string | No | β€” | | | footerBackgroundColor | string | No | β€” | | | footerStyle | React.CSSProperties | No | - | - | | backgroundPosition | string | no | "bottom" | when there is background image url this is css property for position | | backgroundRepeat | string | no | "no-repeat, no-repeat" | when there is background image url this is css property for repeat | | bgImageTakesAllWrappers | string | no | false | when there is background image url takes all if width is not 100%, but with 100% it already takes all | | borderWidth | number | No | β€” | border width of the body | | borderColor | string | No | β€” | Border will work if border width is greater than 0 | | openCounter | boolean | No | `true` | When enabled, appends `` at the end of the body content. This tag has no visual effect on the rendered email. | All other standard attributes for the `` element are supported. ## Open counter tracking By default, `Body` appends a `` tag as the last element inside ``. This tag does not affect how the email looks in inboxes and is intended for open-counter tracking in downstream email pipelines. ```tsx theme={null} // Tracking tag is included by default ... // Disable the tracking tag ... ``` # BodyContent component Source: https://docs.emailux.com/components/body-contents Create BodyContent wrapper tag ## 1. Install dependencies Install the EmailUX Email package locally and a few components. ```bash theme={null} # pnpm pnpm add @emailux/components # npm npm install @emailux/components # yarn yarn add @emailux/components ``` ## 2. Usage ```tsx theme={null} import { BodyContent } from "@emailux/components"; export default function EmailTemplate() { return <> Header Body Footer } ``` ## Props | Name | Type | Required | Default | Description | | ----------------------- | ------------------- | -------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | children | React.ReactNode | Yes | β€” | Content of the email document | | dir | "ltr" \| "rtl" | No | Comes from wrapping `Html` component's `dir` context prop which is `ltr` | Text direction | | background | string | Yes | β€” | β€” | | backgroundColor | string | Yes | β€” | β€” | | style | React.CSSProperties | No | - | - | | width | number or "100%" | No | β€” | width of container | | padding | string | No | `12px 20px` | inner padding | | outerBgColor | string | No | β€” | When whidth is not `100%` and a number, you can set this value as Hex color value to set the left and right side of the section background color, not the inside | | borderRadius | string | No | | | | className | string | no | β€” | β€” | | backgroundPosition | string | no | "bottom" | when there is background image url this is css property for position | | backgroundRepeat | string | no | "no-repeat, no-repeat" | when there is background image url this is css property for repeat | | bgImageTakesAllWrappers | string | no | false | when there is background image url takes all if width is not 100%, but with 100% it already takes all | | borderWidth | number | No | β€” | border width | | borderColor | string | No | β€” | Border will work if border width is greater than 0 | # Box component Source: https://docs.emailux.com/components/box Create Box wrapper tag ## 1. Install dependencies Install the EmailUX Email package locally and a few components. ```bash theme={null} # pnpm pnpm add @emailux/components # npm npm install @emailux/components # yarn yarn add @emailux/components ``` ## 2. Usage ```tsx theme={null} import { Box } from "@emailux/components"; export default function EmailTemplate() { return <> } ``` ## Props | Name | Type | Required | Default | Description | | ------------------ | ------------------- | -------- | ------------------------------------------------------------------------ | -------------------------------------------------------------------- | | children | React.ReactNode | Yes | β€” | Content of the email document | | dir | "ltr" \| "rtl" | No | Comes from wrapping `Html` component's `dir` context prop which is `ltr` | Text direction | | backgroundColor | string | Yes | β€” | β€” | | style | React.CSSProperties | No | - | - | | width | number or "100%" | No | β€” | width of container | | padding | string | No | `10px 16px` | inner padding | | className | string | no | β€” | β€” | | borderRadius | string | No | | | | backgroundImageUrl | string | no | | Box background image | | backgroundPosition | string | no | "bottom" | when there is background image url this is css property for position | | backgroundRepeat | string | no | "no-repeat, no-repeat" | when there is background image url this is css property for repeat | | itemCenter | boolean | no | true | Inner items will be aligned center | | center | boolean | no | true | The box will be positioned center of email | | borderWidth | number | No | β€” | border width | | borderColor | string | No | β€” | Border will work if border width is greater than 0 | # Button component Source: https://docs.emailux.com/components/button Create Button component ## 1. Install dependencies Install the EmailUX Email package locally and a few components. ```bash theme={null} # pnpm pnpm add @emailux/components # npm npm install @emailux/components # yarn yarn add @emailux/components ``` ## 2. Usage ```tsx theme={null} import { Button } from "@emailux/components"; ); } ``` ## 4. Use the template to convert and send email ```jsx parser.tsx theme={null} import EmailTemplate from 'emails/email-template'; import { getHtml } from "@emailux/components"; export default function hanlder(req, resp){ try{ // convert template to Html const name = 'John'; const { html, error } = getHtml(); if(!error){ // handle error } // handle html // send email `sendEmail(html)` using your provider like sendGrid or EmailUX // .... } catch (error){ } } ``` # EmailUX Email Source: https://docs.emailux.com/introduction Build and send emails using EmailUX Email. ## Getting Started EmailUX Email is tested and designed to make your job easier to author emails Create a brand-new folder with packages powered by EmailUX Email. ## Components These are some standard components build using table-based structure. So that you don't have to deal with. A React html component to wrap emails. The main wrapper that hold your content. A React button component to help build emails. A block of text separated by blank spaces. ## Integrations In order to send EmailUX Emails you have to convert it to an HTML string and then you can send that using your own or our sending provider. Call render and deliver from Node with the npm package @emailux/api-client (SendGrid, Gmail, SMTP). ## Authors * Hamed Rohani ([@hmdroh](https://x.com/hmdroh))