rpremraj / mailR

A utility to send emails from the R programming environment
http://rpremraj.github.io/mailR/
190 stars 57 forks source link

Glue not supported #94

Open surpavan opened 4 years ago

surpavan commented 4 years ago

Firstly, thank you for the wonderful package, work life is made easy with it.

When using glue() function in subject, it is not supporting, it is throwing below error:

Error in FUN(X[[i]], ...) : 
  Sorry, parameter type `NA' is ambiguous or not supported.

If I remove glue or wrap it in paste() it works.

library(glue)

send.mail(from='an email address',
          to=c('some email'),
          subject=paste(glue("test- {strftime(startdate,'%B %Y')}")),
          body=content_html,
          html=TRUE,
          smtp=list(host.name='something here',send=TRUE),
          authenticate = FALSE,
          attach.files = currentpath)