I am trying to use the RDORecipients.AddMultiple function to add a large number of recipients to a message.
RDOSession session = new RDOSession();
RDOMail mail = session.CreateMsgFromMsgFile("test.msg", "IPM.Note");
List<string> recipientsList = {"test1@test.com", "test2@test.com"};
Array recipients = recipientsList.ToArray();
rdoMail.Recipients.AddMultiple(ref recipients, 1);
An exception SafeArrayTypeMismatchException (specified array was not of expected type) is being thrown on the last line. I have tried creating the array in different ways with both new and Array.CreateInstance(typeof(string), number of elements). I have a feeling I need to do something between the managed/unmanaged code but I am not sure how. Either that or the documentation/pinvoke signature is incorrect but that is not likely.