Adding a CC when using MailClientAgent.Launch()?

The Launch() method of the Aspose.Windows.Forms.MailClientAgent class takes a RecipientCollection param.

I am looking for a way to put a single person in the “To:” field, the rest as "CC:"s. I don’t want them all in the “To:” line.

Is there anyway to do this now? If not, can this be added?

Hi,

I will check with the developers to see how we can achieve this. I will get back to on this as soon as possible.

Thanks.

Hello, please try the following code:

RecipientCollection to = new RecipientCollection();//recipeint
to.Add(new Recipient("test2@aspose.com"));
to.Add(new Recipient("test1@aspose.com", RecipientType.CC));

MailClientAgent agent = new MailClientAgent();//mail client

string filePath = Environment.CurrentDirectory + "\\test.txt";
if (System.IO.File.Exists(filePath))
{
//launch
agent.Launch("hello, kyle", "Hi, man\r\nWhat are you doing?", to, new string[] { filePath });
}
else
{
agent.Launch("hello, kyle", "Hi, man\r\nWhat are you doing?", to,null);
}