mailR HTML tables not rendering properly in email

I've created a quick report of tables that I want to email out on a regular basis. When I knit the HTML file it looks like this:

However, when I email it all the borders disappear:

My markdown code looks like:

title: "Email Test"
output: html_document

## Hello world!

```{r setup, include=FALSE, echo=FALSE}

### Table 1:
```{r ResponseBoard, include=TRUE, echo=FALSE, results='asis'}

head (mtcars, 10) %>% 
  rownames_to_column(var = "car") %>% 
  select (cyl, car, mpg, disp, hp) %>% 
  arrange (cyl) %>% 
  kable (escape = FALSE, 
         align = "clccc") %>% 
  kable_styling(c("bordered")) %>% 
  column_spec(1:5, color = "black") %>% 
  collapse_rows(columns = 1, valign = "middle") 

And my mailR code looks like:

# compile using rmarkdown
rmarkdown::render("C:/Users/grousell/OneDrive - Grand Erie DSB/Surveys/2018-19/Student Census/Data Collection/Email_Test.Rmd")


send.mail(from = "",
          to = "", # 
          subject = "TEST EMAIL",
          html = TRUE,
          inline = FALSE,
          body = "Email_Test.html",
          authenticate = TRUE,
          smtp = list( = "", 
                      port = xxx,
             = "", 
                      passwd = "xxxxxxxxxxxxx", 
                      tls = TRUE)

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.