【发布时间】:2016-05-09 20:28:14
【问题描述】:
我正在使用下面的代码发送经过身份验证的电子邮件,如 https://github.com/rpremraj/mailR 中所述。
一切正常,但希望在发送后抑制下面的 Java 对象消息,因为它不会通过批处理文件运行。
这可能吗?
[1] "Java-Object{org.apache.commons.mail.MultiPartEmail@6b09bb57}"
send.mail(from = "sender@gmail.com",
to = c("recipient1@gmail.com", "Recipient 2 <recipient2@gmail.com>"),
replyTo = c("Reply to someone else <someone.else@gmail.com>")
subject = "Subject of the email",
body = "Body of the email",
smtp = list(host.name = "smtp.gmail.com", port = 465, user.name = "gmail_username", passwd = "password", ssl = TRUE),
authenticate = TRUE,
send = TRUE)
【问题讨论】:
-
将
send.mail(...)包裹在invisible()中? -
这就像一个魅力!谢谢你!! A+++++