Blastula: insert footer into email

Hi,

I am using blastula to automatically send me reports
It mentions in the documents that I am able to send Markdown files as an email body using something like
email <- render_email('email.Rmd'), which i have written and works really well. I was wondering is it possible to add a footer to the email while still using the Rmd. I see in docs the the following code has the footer which is basically what i want but its building the content of the email within the code.


email <-
  compose_email(
    body = md(
      c(
        "Hello,
        This is a *great* picture I found when looking for sun + cloud photos:",
        img_string
      )
    ),
    footer = md(
      c(
        "Email sent on ", date_time, "."
      )
    )
  )

Is it possible to somehow get this into the Rmd method?

Thank you for your time

I believe you could use

output:
    blastula_email: 
        includes:
            after_body: my_footer.html

To include some html content in the <div class="footer"> part of the email.

I guess it behave quite the same as for a html_document on this header, footer thing.

An, example

---
title: "text_to_html"
author: "ThZ"
date: "30/10/2020"
output: 
  blastula::blastula_email:
    includes:
      after_body: footer.html
    connect_footer: TRUE
---

# Something

Some content


```{cat, engine.opts=list(file = "footer.html")}
<p>This is a footer</p>
```

You can obviously generate your footer.html file outside the html file to provide in the YAML header.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.