Microsoft365R outlook function, multiple recipients returns error

185 views Asked by At

I am attempting to draft and send emails in MS Outlook using the Microsoft365R package in RStudio. Using R4.2.2 with the latest related package updates.

This function used to work around November 2021, but I want to avoid using deprecated versions.

When I put multiple recipients, I am returned an error. Same error when I add_recipients to the existing set_recipients as well.

#1. Create draft
my_email <- my_outlook$
  create_email()$
  set_body("Hello from R")$
  set_subject("Hello")$
  set_recipients(to=c("[email protected]","[email protected]"), 
                 cc=c("[email protected]"),
                 bcc=c("[email protected]"))
Warning messages:
1: In !is_empty(addr_list) && is.na(addr_list) :
  'length(x) = 2 > 1' in coercion to 'logical(1)'
2: In is_empty(x) || !is.na(x) :
  'length(x) = 2 > 1' in coercion to 'logical(1)'

Help?

1

There are 1 answers

1
jaramana On

The script works as of 02/07/2023.

Not sure what changed, but it works now.