Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29916

I can't attach html file while using emayili

$
0
0

I'm trying to send an e-mail using package emayili and I need to attach an html file. The code runs well and I receive the e-mail, but the file never goes attached. I've been searching and changing my code, but it is always a dead end.

Here is my code:

     email <- envelope() %>%
      from("1234@gmail.com") %>%
      to("1234@gmail.com") %>%
      subject("subject") %>%
      body("text")
    files<-xml2::read_html(paste("D:/path/file",".html",sep=""))
    email <- email %>% attachment(files)
smtp <- server(host = "smtp.gmail.com",
               port = 465,
               username = "1234@gmail.com",
               password = "pass")
smtp(email, verbose = TRUE)

also tried

email <- email %>% attachment(read_html(paste("D:/path/file",".html",sep="")))

and several other things...

Any advice? Thank you for your time


Viewing all articles
Browse latest Browse all 29916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>