0

I am trying to use RDCOMClient to create a large number of mails with attachments. Creating and sending mails as described, e.g., here is working perfectly. But I would like to first generate the mails in the 'Drafts' folder of a specific account to check that everything is okay and later on send them from that folder. In Python I could get the folder names from the MAPI namespace and search for the provided account name and the 'Drafts' folder and then create a mail object into that folder. I haven't found a similar possibility using RDCOMClient.

How can I read the folder and account names and compare against strings and later create and store emails to the 'Drafts' folder?

cataclysmic
  • 187
  • 7

1 Answers1

0

Ive modified a code that find time ago, try it:

    library(RDCOMClient)
 
## init com api
OutApp <- COMCreate("Outlook.Application")
## create an email
outMail = OutApp$CreateItem(0)
## configure  email parameter
outMail[["To"]] = "one@email.cl"
#outMail[["Cc"]] = "other@email.cl"
#outMail[["Attachments"]]$Add("Postergaciones_julio.csv")
outMail[["subject"]] = "Título - Este es un test"
outMail[["body"]] =  "cuerpo Este es un test"
## save it                    
outMail$Save()