+1 vote


I'm currently working on a project where the user can receive and send recurring appointments and edit single instances of these recurring events.
I've figured out that i need the recurrence-id to specify the instance that i want to edit. Now my question is, how can i get and set it with the mail.dll?
I was already thinking about getting it from the raw mail text with:

string mailContent = mail.RenderEml();

and some splitting operations. And until now I have no idea how to set the recurrence-id when sending a mail.

What is the best way to do this?

Regards Johannes

Mail.dll Verision 3.0.12135.1804

by (770 points)

1 Answer

+1 vote
Best answer

I think recurrence-id is not exposed by any property on the Event object.

You'll have to set it manually, adding custom header, using Event.AddCustomHeader method.

PdiHeader rid = new PdiHeader("RECURRENCE-ID","19960401");
rid.KeyParameters.Add(new KeyValues("VALUE", "DATE"));

PdiHeader rid = new PdiHeader("RECURRENCE-ID","19960120T120000Z");
rid.KeyParameters.Add(new KeyValues("RANGE", "THISANDFUTURE"));

You can use Event.GetHeader method, to retrieve this header:

PdiHeader rid = event.GetHeader("RECURRENCE-ID");
string thisandfuture = rid.GetKeyParameter("RANGE");
string value = rid.Value("RANGE")
by (272k points)
selected by
Thanks for your help
The latest version will include Event.RecurrenceId property.