我sendmailR
用来从 R 发送电子邮件。有谁知道需要使用什么才能附加多个文件?
这是我一直用于单个附件的代码,但我不知道如何为多个文件调整它:
library(sendmailR)
from <- "......org"
to <- c("Pegah@...net")
subject <- "Daily Report"
body <- "Attached is today's Daily Report"
mailControl = list(smtpServer=".....net")
attachmentPath <- paste0("/Rate and Lab Counts ", Sys.Date(), ".png")
attachmentObject <- mime_part(x=attachmentPath, name=attachmentName)
bodyWithAttachment <- list(body,attachmentObject)
sendmail(from=from, to=to, subject=subject, msg=bodyWithAttachment, control=mailControl)