我正在尝试使用sendmailR在R中附加文件。
这可能吗?
不包括attach.files行发送电子邮件而没有问题。
to <- "<me@localhost>"
subject <- "test attachment"
body <- list("test")
attach.files = c("test.jpeg"),
sendmail(from, to, subject, body,
control=list(smtpServer="192.168.0.51"))}
Error: unexpected '}' in:
"sendmail(from, to, subject, body,
control=list(smtpServer="192.168.0.51"))}"
答案 0 :(得分:0)
试试下面的代码:
to <- "<me@localhost>"
subject <- "test attachment"
attachment -> mime_part (x = "test.jpeg")
body <- list("test", attachment)
sendmail(from, to, subject, body,
control=list(smtpServer="192.168.0.51"))}