0

In my MVC project, iam using ews to create and update appointments in outlook calendar I have a small problem. When I create / update an appointment in the outlook calendar with ews, the body message not showing correct !

I am adding

appt.Body = "rådgivning Møde"

And in outlook calendar, this message will be displayed as: r?dgivning M?de

Appointment appt = Appointment.Bind(ExchangeServerConnection, apptID, new 
PropertySet(AppointmentSchema.Subject, AppointmentSchema.Body, AppointmentSchema.TextBody, AppointmentSchema.LegacyFreeBusyStatus));    

if (appt.LegacyFreeBusyStatus == appstatus)
{
    appt.Subject = subject;
    appt.Body = message;
    appt.LegacyFreeBusyStatus = LegacyFreeBusyStatus.Busy;

    //set explicit mode to SendToNone. Default mode is SendToAllAndSavecopy, it converts appointment to meeting.
    SendInvitationsOrCancellationsMode mode = SendInvitationsOrCancellationsMode.SendToNone;

    appt.Update(ConflictResolutionMode.AlwaysOverwrite, mode);
Ian
  • 30,182
  • 19
  • 69
  • 107
Kim Hansen
  • 229
  • 1
  • 5
  • 12
  • I would suggest you enable tracing https://msdn.microsoft.com/en-us/library/office/dd633676(v=exchg.80).aspx in your code and then post the XML that is being sent to the server. It should all be UTF8 so it shouldn't be a problem but this will tell you either way what is being posted to the server. – Glen Scales May 10 '17 at 23:42

1 Answers1

0

You need to specify the content encoding (see this question here as well). So your body must be flagged as UTF-8 or something which fits your needs via the following if you use HTML:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Fore more info's see the Microsoft howto here.

BastianW
  • 2,628
  • 7
  • 29
  • 38