Open algo-se opened 3 years ago
Hi, I´ve managed to hack this using block_articles
:
email <-
compose_email(
body =
blocks(
block_text(
md(
c(
'## My email',
"The table now looks centered but is weird in android:"
))
),
block_articles(
article(),
article(content = exibble_a_html), # is centered but looks weird in outlook android app
article()
),
block_text("Outside block_articles looks fine:"),
exibble_a_html # looks ok but not centered
)
)
email %>%
smtp_send(
from = "me@me",
to = c("me@me"
),
subject = "Hola",
credentials = creds_key(id = "id")
)
Which looks centered in the outlook client:
BUT now looks weird in the outlook android app 😢 : Clic for long picture
We will take a closer look at this later in the year (when we start working on blastula again). As a workaround, you can save the gt table as an image with gtsave()
, and it's not a bad option unless you need copy/paste ability.
Is there a way to center a table when sending a email? Using outlook client the table is left-align, however when rendering the email in the browser it looks fine.
reprex:
Browser:![image](https://user-images.githubusercontent.com/72490678/106869670-7eb5b380-66d0-11eb-9665-a8fab7a132b8.png)
Outlook Client:![image](https://user-images.githubusercontent.com/72490678/106869728-8f662980-66d0-11eb-9b7f-4204ae3bc892.png)