Peter

Altough I have two mailboxes, I want to place mails, that I send from the secondary mailbox, in the sent-folder of the secondary mailbox. In the following code I use the command

outMail[[“SaveSentMessageFolder”]] <- outApp[["Session"]]$Folders("secondary@outlooksend.at")$Folders("Gesendete Elemente")

afterwards I get the following error

80020009
No support for InterfaceSupportsErrorInfo
checkErrorInfo -2147352567
Error: Ausnahmefehler aufgetreten.

Can You tell me the correct syntax.

require(RDCOMClient)
OutApp <- COMCreate("Outlook.Application")
outMail <- OutApp$CreateItem(0)
outMail[["to"]] <- "peter.test@checkoutlook.at"
outMail[["subject"]] <- "TEST"
#outMail[["body"]] <- "This is a TEST"
outMail[["bodyformat"]] <- 2
outMail[["SentOnBehalfOfName"]] <- "secondary@outlooksend.at"
outMail[["HTMLbody"]] <- '<FONT FACE="Trebuchet MS"Sehr geehrte Damen und HerrenDas ist ein TestBeim Datenimport sind folgende Fehler aufgetreten:’
outMail[[“SaveSentMessageFolder”]] <- outApp[["Session"]]$Folders("secondary@outlooksend.at")$Folders("Gesendete Elemente")
outMail$Send()

Thanks!