r blastula - not rendering rmarkdown correctly in the body of gmail

Viewed 232

I'm learning the blastula package in r for sending rmarkdown files in the body of an email. This is the code I use:

rmd_email <- render_email('my_rmarkdown.Rmd')

rmd_email %>%
  smtp_send(
    from = "name@gmail.com",
    to = "name@gmail.com",
    subject = "report",
    credentials = creds_key(id = "gmail")
  )

However, the rmarkdown document is not being rendered correctly in the body of the emails I get. It seems that gmail is not decoding the base64 text:

The email I get

What am I doing wrong?

1 Answers

OK, I got a solution. Just format the metadata when creating the rmarkdown document. So, instead of

---
output: html_document
---

use the following:

---
output: blastula::blastula_email 
---
Related