Skip to content

email: multiple pages may produce email; last one wins #10741

Open

Description

@aronatkins

Bug description

Given a Quarto website with multiple pages containing {.email} blocks, the last rendered page defines the contents of the email metadata.

Steps to reproduce

Render a project containing a _quarto.yml and two qmd files:

project:
  type: website
---
title: index page
format:
  email: {}
---

This is the index page.

::: {.email}

::: {.subject}
email from index
:::

The index page may want to produce email.
:::
---
title: other page
format:
  email: {}
---

This is the other page.

::: {.email}

::: {.subject}
email from other
:::

The other page may want to produce email.
:::

The email-preview/ directory and .output_metadata.json file come from the last render to occur, with no indication that the previous result is being overwritten.

Expected behavior

This is an ambiguous situation. When two documents in the same directory want to produce email metadata, only one can win, because there is a singular, well-known .output_metadata.json file.

Actual behavior

Last-render wins.

Your environment

No response

Quarto check output

Quarto 1.5.57
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.57
      Path: /Users/aron/quarto/quarto-1.5.57-macos/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /Library/TeX/texbin
      Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.2
      Path: /opt/homebrew/opt/python@3.12/bin/python3.12
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.3
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
      knitr: 1.48
      rmarkdown: 2.27

[✓] Checking Knitr engine render......OK

Activity

  1. added
    bug
    on Sep 6, 2024
  2. aronatkins commented on Sep 6, 2024

    @aronatkins
    ContributorAuthor

    Note: This behavior occurs with a flat hierarchy and with nested hierarchy. In both situations, the last-one-rendered wins.

    # flat
    _quarto.yml
    index.qmd
    other.qmd
    
    # hierarchy
    _quarto.yml
    index.qmd
    sub/other.qmd
    

    In both cases, the top-level _site/email-preview and _site/.output_metadata.json file is written with contents from the last render to occur.

  3. aronatkins commented on Sep 6, 2024

    @aronatkins
    ContributorAuthor

    Folks may feel that a website (or any multi-page project) is the best way to communicate their message. Additionally, they may want to produce a customized email message whenever that project is rendered.

    Connect currently supports a single custom email message.

  4. added
    enhancement
    and removed
    bug
    on Sep 19, 2024
  5. added this to the v1.10 milestone on Feb 13, 2026
  6. juleswg23 commented on Feb 27, 2026

    @juleswg23
    Contributor

    I believe this is somewhat improved by #13882

    Specifically, when multiple emails are produced by one qmd file.

    Is there desire to resolve the situation where multiple emails are produced by multiple qmd files?

  7. aronatkins commented on Mar 2, 2026

    @aronatkins
    ContributorAuthor

    A single qmd versus a multiple qmd site feels like an organizational choice. Just as content can be spread across files, it seems like those files should also be able to construct email messages.

    I don't have specific examples of users attempting to do this; I created my original example and this tracking issue when initially testing Quarto email support.

  8. modified the milestones: v1.10, v1.11 on Jul 30, 2026
  9. modified the milestones: v1.11, v1.12 on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    emailenhancementprojects

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions