通过rstudio 3.5.1中的RDCOM客户端发送电子邮件,错误:发生异常

问题描述 投票:0回答:1

直到今天,我已经成功地使用RDCOM通过rstudio发送邮件。我的rstudio版本是3.5.1,我使用此链接来安装RDCOM

install.packages(“ RDCOMClient”,repos =“ http://www.omegahat.net/R”)

my code is as follow

OutApp <- COMCreate("Outlook.Application")
outMail = OutApp$CreateItem(0)
outMail[["To"]] = "[email protected]"
outMail[["subject"]] = "Test Subject"
outMail[["body"]] = "Body of email"  
outMail[["Attachments"]]$Add("C:\\Users\\destination\\file.csv")
outMail$Send()

今天我收到以下错误

80020009不支持InterfaceSupportsErrorInfocheckErrorInfo -2147352567错误:发生异常。

已经花了几个小时尝试修复它,但到目前为止我还无法修复。在添加附件部分失败

rstudio rdcomclient
1个回答
0
投票

[我认为,我的问题是我在电子邮件的“收件人”部分中放置了多个电子邮件地址。

似乎正在正确地向一个人发送电子邮件

© www.soinside.com 2019 - 2024. All rights reserved.