Request for help on using Aspose.Email.Clients.Exchange.WebService

Hello,

Is it possible to schedule a meeting with an email address different from the one associated with the account I am logged in with?

For example, I am an executive assistant and I have access to my calendar as well as my directors’ calendars.

To log in to my account, I use this:

try
{
// Create instance of IEWSClient class by giving credentials
IEWSClient client = EWSClient.GetEWSClient("https://outlook.office365.com/ews/exchange.asmx", "MyUser ", "pwd", "domain");

// Create the meeting request
Appointment app = new Appointment("meeting request", DateTime.Now.AddHours(1), DateTime.Now.AddHours(1.5), "administrator@test.com" , "bob@test.com");
app.Summary = "meeting request summary";
app.Description = "description";

RecurrencePattern pattern = new Aspose.Email.Calendar.Recurrences.DailyRecurrencePattern(DateTime.Now.AddDays(5));
app.Recurrence = pattern;

// Create the message and set the meeting request
MailMessage msg = new MailMessage();
msg.From = "administrator@test.com"; //here I enter an email address different from that of the account connected above
msg.To = "bob@test.com";
msg.IsBodyHtml = true;
msg.HtmlBody = "<h3>HTML Heading</h3><p>Email Message detail</p>";
msg.Subject = "meeting request";
msg.AddAlternateView(app.RequestApointment(0));

// send the appointment
client.Send(msg);
Console.WriteLine("Appointment request sent");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}

And when I send the invitations, I always receive them under the name of the person who is logged in with their account and not the email address I provided for the organizer.

Thank you in advance for your help.

Hello @BKOUR,

Perhaps, you need to assign the appropriate permissions in the Exchange admin center .
Thanks.