none
Send meeting invitation to changed attendees only. RRS feed

  • Question

  • Hi,

    I use EWS library.
    I have to create new appointment and send invitations to some attendees.
    Than I need add or delete an attendee and send invitation to only changed attendee.

    I found an article on MSDN and tried to do it in test project:

        public partial class Form1 : Form
        {
            private const string OFFICE_365 = "Office365_email@aa.com";
            private const string GMAIL_1 = "Gmail1@gmail.com";
            private const string GMAIL_2 = "Gmail2@gmail.com";

            private ExchangeService _exchangeService;
            private ItemId _itemId;

            public ExchangeService ExchangeService
            {
                get
                {
                    if (_exchangeService == null)
                    {
                        _exchangeService = new ExchangeService(ExchangeVersion.Exchange2013_SP1)
                        {
                            Credentials = new WebCredentials("sender@aa.com", "pass"),
                            Url = new Uri(@"https://outlook.office365.com/EWS/Exchange.asmx")
                        };
                    }
                    return _exchangeService;
                }
            }

            public Form1()
            {
                InitializeComponent();
            }

            private void button1_Click(object sender, EventArgs e)
            {
                Appointment appointment = new Appointment(ExchangeService);
                appointment.Start = DateTime.Now.AddDays(2);
                appointment.End = appointment.Start.AddHours(2);
                appointment.Subject = DateTime.Now.Ticks.ToString();
                appointment.RequiredAttendees.Add(OFFICE_365);
                appointment.RequiredAttendees.Add(GMAIL_1);
                appointment.RequiredAttendees.Add(GMAIL_2);

                appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

                _itemId = appointment.Id;

                MessageBox.Show("Done");
            }

            private void button2_Click(object sender, EventArgs e)
            {
                Appointment appointment = Appointment.Bind(ExchangeService, _itemId);

                appointment.RequiredAttendees.RemoveAt(0);

                appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToChanged);
                MessageBox.Show("Done");
            }
        }


    It doesn't work properly!!  - When I update appointment (button2_Click) I receive invitation for all attendees! :(

    I looked for the same provblem and found an article on StackOverflow.
    I tried to do it but it still doesn't work.

    I use EWS 2.2 the last version: 15.0.913.15

    How can I fix it?
    Any ideas?

    Thanks.


    Thursday, May 21, 2015 9:01 AM

All replies

  • Hi,

    Any ideas? :(

    Thursday, June 25, 2015 1:17 PM
  • I appreciate this is an old query, but it has no answer and I am getting exactly the same issue, removing an attendee causes an appointment update to be sent for all attendees. I'd like to understand the reason behind the decision (reference to the Microsoft Support Article mentioned within the StackOverflow thread) but more importantly is there a way around this such that removal of an attendee sends a cancellation only to that attendee and not to all?

    Note that I have tried each of the ConflictResolutionMode values and all still send an appointment to all. 

    Regards,

    Tuesday, June 20, 2017 4:40 PM