1

I am getting the following error trying to use the mailR package (0.4.1).

Error in send.mail(from = "EMAIL@gmail.com", to = EMAIL@gmail.com", : could not find function "send.mail

Code is listed below. Just trying to send an email with an inline image. I got the gmailR package to send an email, but could not get an inline image to show up. I would be more than happy to use either package.

library(mailR)
library(rJava)
png(file.path(getwd(), "FILEPATH.png", "img.png")); plot(0); dev.off()
send.mail(from = "EMAIL@gmail.com",
          to = "EMAIL@gmail.com",
          subject = "Image TEST",
          body = '<img src="../img.png">',
          html = TRUE,
          inline = TRUE,
          smtp = list(host.name = "smtp.gmail.com", 
                      port = 465, 
                      user.name = "EMAIL@gmail.com", 
                      passwd = "PASSWORD", 
                      ssl = TRUE),
          authenticate = TRUE,
          send = TRUE)

Please let me know if you have any questions.

Thanks.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Eric
  • 103
  • 11
  • Here is the error. Error in send.mail(from = "EMAIL@gmail.com", to = "EMAIL@gmail.com", : could not find function "send.mail" – Eric Mar 04 '19 at 05:26
  • 2
    Possible duplicate of [Error: could not find function ... in R](https://stackoverflow.com/questions/7027288/error-could-not-find-function-in-r) – Linda Lawton - DaImTo Mar 04 '19 at 07:18
  • 1
    "I got the gmailR package to send an email" If that's the package where this function is, it doesn't look like you've loaded it – camille Mar 04 '19 at 20:01

0 Answers0