By default, Blastula encloses RMarkdown emails with a gray border. This looks wrong on Gmail, as Gmail already adds a gray border to emails, boxing all your rmarkdown mails with a white box inside a gray box, inside a another white box inside yer another gray box.
The code I used to produce this email is as follows:
informe_html <- readr::read_file("html_email.html")
email <- compose_email(body = md(informe_html))
My html file has no borders at all, just the dark grey background over a white background. The remaining light gray, white and light gray borders are added by Blastula.

The
emailobject produced fromcompose_email()contains HTML, so you can use string manipulation to change the appearance of the email. When you inspect the HTML code, the grey looks like it is coming from the<body>tag, which has the style attribute:background-color:#f6f6f6. Removing this tag should remove the grey border around the message.blastula_messageobjects seem to have two versions of the HTML for the message:html_str: The raw HTML stored as a character string.html_html: The HTML stored as ahtmlobject.The first is what actually gets sent when you use
smtp_send()and the second seems to be what you see when you preview the message viaprint(email). To be safe you can remove thebackground-colorattribute from both:The
(;)in the pattern is in casebackground-colorisn't the only style attribute for<body>.When you preview
emailthe grey border should now be gone as the background of the mail will now be transparent.