So, I want to send an html-file, that is created from a .Rmd file to a certain email address using the send.mail() function from the mailR package. However, instead of sending the file as a mail it only sends whatever I assign to body="example-file.html", so that the mail literally only says example-file.html.
There is an automated script running in the backend, that is identical and yields the wanted result. However, if I execute it manually, it only sends a string as email again. Hence, I assume it has something to do with my installation (in RStudio Server 3.6.3.).
Make sure you use the html = TRUE parameter, that should take care of the headers (indicating to the email receiver that the content must be read as html and not just text). Also note that some of the more advanced features of html might not work.