> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: ed31e723-8482-4b44-9a67-285da85424c5
---

# Default email modules

> Learn about the default modules that HubSpot provides for building email templates. These modules are separate from the default web modules, which are used to build website pages, blog posts, and blog listing pages.

Below, learn about the modules that you can use when building email templates.

These modules are separate from [default web modules](/cms/reference/modules/default-modules), which can be used to build website pages, blog posts, and blog listing pages. Many of the modules below were released to replace usage of default web modules in emails, such as the `email_logo` module replacing the `logo` module. If your email templates are still using the web versions of these modules, learn how to [update your email templates to use email-specific modules instead](/cms/start-building/building-blocks/modules/default-email-modules#default-email-modules).

To view a default module's code, you can view and clone the module within the `@hubspot` folder of the design manager, or [fetch it](/developer-tooling/local-development/hubspot-cli/reference#fetch-files) by its path locally using the HubSpot CLI.

<Frame>
  <img src="https://www.hubspot.com/hubfs/Knowledge_Base_2021/Developer/design-manager-default-modules.png" alt="design-manager-default-modules" />
</Frame>

## Email blog post filter

A version of the [blog post filter](#blog-post-filter) module for emails.

```hubl theme={null}
{% module "post_filter" path="@hubspot/email_post_filter" %}
```

| Parameter          | Type   | Description                                                                                               | Default          |
| ------------------ | ------ | --------------------------------------------------------------------------------------------------------- | ---------------- |
| `select_blog`      | Blog   | The blog to display posts from.                                                                           |                  |
| `filter_type`      | Choice | Type of filtering links to show. Choices include:<ul><li>`tag`</li><li>`month`</li><li>`author`</li></ul> | `tag`            |
| `order_by`         | Choice | Ordering for the values of filter links. Choices include:<ul><li>`post_count`</li><li>`name`</li></ul>    | `post_count`     |
| `list_title`       | Text   | An H3 heading.                                                                                            | `"Posts by Tag"` |
| `max_links`        | Number | Number of filter links to show. Leave blank to show all.                                                  | `5`              |
| `expand_link_text` | Text   | Text to display if more than the `max_links` value to display are available.                              | `"See all"`      |

## Email blog post listing

A version of the [blog post listing](#blog-post-listing) module for emails.

```hubl theme={null}
{% module "post_listing" path="@hubspot/email_post_listing" %}
```

| Parameter      | Type   | Description                                                                                                                                                                                                                                                                                                                                 | Default          |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `select_blog`  | Blog   | The blog to display posts from.                                                                                                                                                                                                                                                                                                             |                  |
| `listing_type` | Choice | The type of listing for your posts. Choices include:<ul><li>`recent`: most recent.</li><li>`popular_all_time`: most popular of all time.</li><li>`popular_past_year`: most popular the past year.</li><li>`popular_past_six_months`: most popular the past six months.</li><li>`popular_past_month`: most popular the past month.</li></ul> | `recent`         |
| `list_title`   | Text   | An H3 heading.                                                                                                                                                                                                                                                                                                                              | `"Recent Posts"` |
| `max_links`    | Number | Maximum number of posts to display.                                                                                                                                                                                                                                                                                                         | `5`              |

## Email Call-to-Action

A version of the [Call-to-Action](#call-to-action) module for emails.

```hubl theme={null}
{% module "cta" path="@hubspot/email_cta" %}
```

| Parameter | Type   | Description                            |
| --------- | ------ | -------------------------------------- |
| `guid`    | String | Globally Unique Identifier of the CTA. |

## Email header

A version of the [header](#header) module for emails.

```hubl theme={null}
{% module "email_header" path="@hubspot/email_header" %}
```

| Parameter    | Type   | Description                                               | Default                     |
| ------------ | ------ | --------------------------------------------------------- | --------------------------- |
| `value`      | Text   | Text for the heading.                                     | `"A clear and bold header"` |
| `header_tag` | Choice | Choose a heading level. Choice include `h1` through `h6`. | `h1`                        |

## Email HTML

Raw HTML module for emails.

```hubl theme={null}
{% module "raw_html_email" path="@hubspot/raw_html_email" %}
```

| Parameter | Type | Description | Default                                     |
| --------- | ---- | ----------- | ------------------------------------------- |
| `html`    | HTML | HTML block. | `   \n Add custom HTML to your email.\n   ` |

## Email image

Image module for emails.

```hubl theme={null}
{% module "image_email" path="@hubspot/image_email" %}
```

| Parameter   | Type   | Description                                                                                      | Default  |
| ----------- | ------ | ------------------------------------------------------------------------------------------------ | -------- |
| `img`       | Image  | Image to be used for the email.                                                                  |          |
| `link`      | Text   | Optional link for the image.                                                                     |          |
| `alignment` | Choice | Alignment of the image. Choice include:<ul><li>`left`</li><li>`center`</li><li>`right`</li></ul> | `center` |

## Email linked image

A version of the [image](#image) module for emails.

```hubl theme={null}
{% module "email_linked_image" path="@hubspot/email_linked_image" %}
```

| Parameter | Type    | Description                                                                                                                                                                                                                                   | Default                                                                                                                                                                                     |
| --------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `img`     | Image   | Image object containing:<ul><li>`src`: image url</li><li>`alt`: alt text for image</li><li>`loading`: lazy loading options include:<ul><li>`disabled`</li><li>`lazy`</li></ul></li><li>`width`: px value</li><li>`height`: px value</li></ul> | `{ "src": "https://static.hubspot.com/final/img/content/email-template-images/placeholder_200x200.png", "alt": "placeholder_200x200", "loading": "disabled", "width": 200, "height": 200 }` |
| `link`    | Text    | Optional link for the image.                                                                                                                                                                                                                  |                                                                                                                                                                                             |
| `target`  | Boolean | Opens link in a new tab.                                                                                                                                                                                                                      | `false`                                                                                                                                                                                     |

## Email logo

A version of the [logo](#logo) module for emails.

```hubl theme={null}
{% module "logo" path="@hubspot/email_logo" %}
```

| Parameter               | Type    | Description                                                                                                                                                           | Default                                                         |
| ----------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| `img`                   | Image   | Image object containing:<ul><li>`override_inherited_src`: override the default logo from settings</li><li>`src`: image url</li><li>`alt`: alt-text for logo</li></ul> | `{ "override_inherited_src": false, "src": null, "alt": null }` |
| `link`                  | Text    | Optional link for the logo. If no url is specified, your logo will link to your primary domain.                                                                       |                                                                 |
| `open_in_new_tab`       | Boolean | Opens link in a new tab.                                                                                                                                              | `false`                                                         |
| `suppress_company_name` | Boolean | Hide the company name when an image is not selected.                                                                                                                  | `true`                                                          |
| `heading_level`         | Choice  | Choose a heading level when no image is selected and `suppress_company_name` equals `false`. Choices include `h1` through `h6`.                                       | `h1`                                                            |

## Main email body

The main body module for emails.

```hubl theme={null}
{% module "email_body" path="@hubspot/email_body" %}
```

| Parameter | Type      | Description                                                                                  | Default |
| --------- | --------- | -------------------------------------------------------------------------------------------- | ------- |
| `html`    | Rich Text | Default content for the email body. Supports HTML. See below for this field's default value. |         |

```hubl theme={null}
<!-- Default html field value -->
<p>Hi {{contact.firstname}},</p>\n<p>Describe what you have to offer the customer. Why should they read? What did you promise them in the subject line? Tell them something cool. Make them laugh. Make them cry. Well, maybe don't do that...</p>\n<p>Use a list to:</p>\n<ul>\n<li>Explain the value of your offer</li>\n<li>Remind the reader what they’ll get out of taking action</li>\n<li>Show off your skill with bullet points</li>\n<li>Make your content easy to scan</li>\n</ul>\n<p><a href=\"http://hubspot.com\">LINK TO A LANDING PAGE ON YOUR SITE</a> (This is the really important part.)</p>\n<p>Now wrap it all up with a pithy little reminder of how much you love them.</p>\n<p>Aw. You silver-tongued devil, you.</p>\n<p>Sincerely,</p>\n<p>Your name</p>
```

## Office location information

Office location information footer for emails (CAN-SPAM compliant).

```hubl theme={null}
{% module "email_can_spam" path="@hubspot/email_can_spam" %}
```

| Parameter | Type      | Description                                                                                                                                               |
| --------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `html`    | Rich Text | Populates required CAN-SPAM information for emails including business address and unsubscribe/preferences links.See below for this field's default value. |

```hubl theme={null}
<!-- Default html field value -->
<p id=\"footer\" style=\"font-family: Geneva, Verdana, Arial, Helvetica, sans-serif; text-align: center; font-size: 12px; line-height: 1.34em; color: {{ secondary_font_color }}; display: block;\">{{ site_settings.company_name }}   {{ site_settings.company_street_address_1 }}  {{ site_settings.company_street_address_2 }}  {{ site_settings.company_city }}  {{ site_settings.company_state }}   {{ site_settings.company_zip }}   {{ site_settings.company_country }} <br><br> You received this email because you are subscribed to {{ subscription_name }} from {{ site_settings.company_name }} . <br><br> Update your <a target=\"_blank\" href=\"{{ unsubscribe_link }}\" style=\"text-decoration: underline; whitespace: nowrap; color: {{ secondary_font_color }};\" data-unsubscribe=\"true\">email preferences</a> to choose the types of emails you receive. <br><br>  <a target=\"_blank\" href=\"{{ unsubscribe_link_all }}\" style=\"text-decoration: underline; whitespace: nowrap; color: {{ secondary_font_color }};\" data-unsubscribe=\"true\">Unsubscribe from all future emails</a>  </p>
```

## Email one line of text

A version of the [text](#one-line-of-text) module for emails.

```hubl theme={null}
{% module "text" path="@hubspot/email_text" %}
```

| Parameter | Type | Description                      | Default                                     |
| --------- | ---- | -------------------------------- | ------------------------------------------- |
| `value`   | Text | Add your text to this parameter. | `"Some additional information in one line"` |

## Email section header

A version of the [section header](#section-header) module for emails.

```hubl theme={null}
{% module "section_header" path="@hubspot/email_section_header" %}
```

| Parameter       | Type   | Description                                                        | Default                      |
| --------------- | ------ | ------------------------------------------------------------------ | ---------------------------- |
| `header`        | Text   | Section header content.                                            | `"A clear and bold header"`  |
| `heading_level` | Choice | Heading level for the `header`. Choices include `h1` through `h6`. | `h1`                         |
| `subheader`     | Text   | Subheading paragraph text for the section.                         | `"A more subdued subheader"` |

## Email social sharing

A version of the [social sharing](#social-sharing) module for emails.

```hubl theme={null}
{% module "social_sharing" path="@hubspot/email_social_sharing" %}
```

Note: The variable `social_link_url` in the default column below is the same value as the `link` parameter.

| Parameter   | Type   | Description                                                                                                                                                                                                                                                                 | Default                                                                                                                                                                                                                                                                                                      |
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `link`      | Text   | This is the destination link that will be shortened for easier sharing on social networks.                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                              |
| `facebook`  | Object | Object containing:<ul><li>`enabled`: boolean to enable social item</li><li>`custom_link_format`: custom URL for socials sharer URL</li></ul>                                                                                                                                | `{ "enabled": false, "custom_link_format": "http://www.facebook.com/share.php?u={{ social_link_url }}" }`                                                                                                                                                                                                    |
| `twitter`   | Object | Object containing:<ul><li>`enabled`: boolean to enable social item</li><li>`custom_link_format`: custom URL for socials sharer URL</li></ul>                                                                                                                                | <code>\{ "enabled": false, "custom\_link\_format": "[https://twitter.com/intent/tweet?original\_referer=\\\{\\\{](https://twitter.com/intent/tweet?original_referer=\\\{\\\{) social\_link\_url }}\&url=\{\{ social\_link\_url }}\&source=tweetbutton\&text=\{\{ social\_page\_title\|urlencode }}" }</code> |
| `linkedin`  | Object | Object containing:<ul><li>`enabled`: boolean to enable social item</li><li>`custom_link_format`: custom URL for socials sharer URL</li></ul>                                                                                                                                | `{ "enabled": false, "custom_link_format": "http://www.linkedin.com/shareArticle?mini=true&url={{ social_link_url }}" }`                                                                                                                                                                                     |
| `pinterest` | Object | Object containing:<ul><li>`enabled`: boolean to enable social item.</li><li>`custom_link_format`: custom URL for socials sharer URL.</li><li>`pinterest_media`: image object including:<ul><li>`src`: image URL.</li><li>`alt`: alt-text for the image.</li></ul></li></ul> | `{ "enabled": false, "custom_link_format": "http://pinterest.com/pin/create/button/?url={{ social_link_url }}&media={{ pinterest_media }}", "pinterest_media": { "src": "", "alt": null } }`                                                                                                                 |
| `email`     | Object | Object containing:<ul><li>`enabled`: boolean to enable social item</li><li>`custom_link_format`: custom URL for socials sharer URL</li></ul>                                                                                                                                | `{ "enabled": false, "custom_link_format": "mailto:?subject=Check out {{ social_link_url }} &body=Check out {{ social_link_url }}" }`                                                                                                                                                                        |

## Email subscription preferences

Module for displaying email subscription preferences.

```hubl theme={null}
{% module "email_subscriptions" path="@hubspot/email_subscriptions" %}
```

| Parameter                       | Type      | Description                                              | Default                                                                                                                                    |
| ------------------------------- | --------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `header`                        | Text      | H1 heading.                                              | `header`                                                                                                                                   |
| `subheader_text`                | Rich Text | Supplemental text for your H1 heading.                   | `"If this is not your email address, please ignore this page since the email associated with this page was most likely forwarded to you."` |
| `unsubscribe_single_text`       | Text      | Preference selection help text.                          | `"Uncheck the types of emails you do not want to receive:"`                                                                                |
| `unsubscribe_all_text`          | Text      | Unsubscribe all help text.                               | `"Or check here to never receive any emails:"`                                                                                             |
| `unsubscribe_all_unsubbed_text` | Text      | Unsubscribe all help text for a currently unsubbed user. | `"You are presently unsubscribed from all of our emails. Would you like to receive our emails again?"`                                     |
| `unsubscribe_all_option`        | Text      | Label for unsubscribe all option.                        | `"Unsubscribe me from all mailing lists."`                                                                                                 |
| `button_text`                   | Text      | Update preferences button text.                          | `"Update email preferences"`                                                                                                               |
| `resubscribe_button_text`       | Text      | Resubscribe button text.                                 | `"Yes, resubscribe me!"`                                                                                                                   |

## Email subscriptions confirmation message

Confirmation of email subscription changes.

```hubl theme={null}
{% module "email_subscriptions_confirmation" path="@hubspot/email_subscriptions_confirmation" %}
```

| Parameter                     | Type      | Description                            | Default                                                                                                                                    |
| ----------------------------- | --------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `header`                      | Text      | H1 heading.                            |                                                                                                                                            |
| `subheader_text`              | Rich Text | Supplemental text for your H1 heading. | `"If this is not your email address, please ignore this page since the email associated with this page was most likely forwarded to you."` |
| `unsubscribe_all_success`     | Text      | Message on unsubscribe.                | `"You have successfully unsubscribed from all email communications."`                                                                      |
| `subscription_update_success` | Text      | Message on subscription update.        | `"You have successfully updated your email preferences."`                                                                                  |

## Email unsubscribe (backup)

Supported in pages, blog posts, and blog listings.

```hubl theme={null}
{% module "email_simple_subscription" path="@hubspot/email_simple_subscription" %}
```

| Parameter           | Type | Description                                | Default                 |
| ------------------- | ---- | ------------------------------------------ | ----------------------- |
| `header`            | Text | H1 heading.                                | `"Email Unsubscribe"`   |
| `input_help_text`   | Text | H3 heading for help text.                  | `"Your email address:"` |
| `input_placeholder` | Text | Placeholder content for the input field.   | `"email@example.com"`   |
| `button_text`       | Text | Text to display on the unsubscribe button. | `"Unsubscribe"`         |

## Email video

A video module for emails.

```hubl theme={null}
{% module "video_email" path="@hubspot/video_email" %}
```

| Parameter          | Type         | Description                                                                                                                                  | Default                                                                                  |
| ------------------ | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `video_type`       | Choice       | Type of video. Choices include:<ul><li>`embed`: embed code from an external source.</li><li>`hubspot_video`: HubSpot hosted video.</li></ul> | `embed`                                                                                  |
| `hubspot_video`    | Video Player | HubSpot hosted video. Used when `video_type` equals `hubspot_video`.                                                                         |                                                                                          |
| `embed`            | Object       | Object containing `source_type`. Only value of `oembed` is available.                                                                        | `{ "source_type": "oembed" }`                                                            |
| `oembed_thumbnail` | Image        | Override oembed thumbnail image when `video_type` equals `embed` and `embed_field` equals `oembed`.                                          | `{"size_type": "exact"}`                                                                 |
| `style_options`    | Object       | Object containing:<ul><li>`play_button_color`: color hex code.</li><li>`play_button_scale`: number 0-100</li></ul>                           | `{ {"play_button_color":{ "color":"#2f4254", "opacity":100},"play_button_scale" : 30} }` |
| `alignment`        | Choice       | Alignment of video. Choices include:<ul><li>`left`</li><li>`center`</li><li>`right`</li></ul>                                                | `center`                                                                                 |
