Calendar. Meeting Invitation. How to set subject in email and does not set in appointment?

Hi everyone,

Please help solve the following issue. We need to send udate of meeting invitation with prefix in the email: “Updated: originalSubj” we need it for smtpClient and for ExchangeClient.

I tried it the following way:

_message.Subject = "Updated: " + _subject;
var calendar = new Calendar("location", DateTime.Now, DateTime.Now, organizer, attendees)
{
    Summary = _subject,
    Description = _body
};
_message.To = calendar.Attendees;
_message.From = calendar.Organizer;
_message.AddCalendar(calendar);

When i send such email by

  • smtpClient. Email is delivered without ‘Updated: ‘ in subject;<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” />

  • exchangeClient. email is delivered with ‘Updated: ‘ in subject, but appointment in calendar is also displayed with such subject, and it is not correct.

Please advise how can I implement it for both exchangeClient and smtpClient.

Thank you in advance

Hi,

Thanks for considering Aspose.

Could you please save the eml and ics file and post here. 2 sets of eml+ics for MailMessage and ExchangeClient scenario. We will look into it. You can save the eml file using MailMessage.Save() and ics file using Calendar.Save() method.

Could you please also check <A href="https://forum.aspose.com/t/44670</A> for adding, updating and cancelling the appointment.The Appointment class has better support for sending meeting requests.</P>

Hi

You can find attached 2 eml, 2 ics and 2 msg files (from outlook 2003).

Now i use version of Aspose.Network 4.8.0.5, and class Appointment insead of Calendar, but behaviour is same.

Hi,

I could not reproduce this behavior with Appointment class of Aspose.Network v4.8. Also, the saved files (eml/msg) during sending, updating and canceling the appointment contained updated subjects. Please find the attached sample application that I used for testing.

Hi Saqib Razzaq

You are right - eml/msg files contain updated subjects, but they are not displayed the proper way in outlook.

Example. invitation update in outlook.

Create meeting request in outlook with subject 'Conversation' and send it to attendees. Then send update for this meeting request with subject ''Conversation to Paul'. Attentees will recieve the updated meeting in email with subject: 'Updated: Conversation to Paul' and in attendees' calendar it will be saved with subj='Conversation to Paul.

Did you reviewed how updated meetings sent from aspose are displayed in outlook?

Example. invitation update in aspose.

Same sample as above.

MailMessage.Subject = "Updated: " + MailMessage.Subject;

view =a.UpdateAppointment();

If you send such update from SmtpClient attendees will recieve email with displayed subject: 'Conversation to Paul' (without word Updated).

From exchangeClient: 'Updated: Conversation to Paul' (and meeting in calendar will have subject 'Updated: Conversation to Paul' instead of 'Conversation to Paul'. It is incorrect behaviour in both cases.

Probably cause of such behaviour is in headers:

email from outlook:

Content-Type: multipart/mixed;

email from smtp:

Content-Type: multipart/alternative;

email from exchange:

Content-Type: multipart/alternative;

We expects the following: possibility send update meeting like outlook sends - subject should start from 'Updated:'

Thank you

Hi,

I did some tests and according to my findings, Microsoft Outlook takes the whole message as a meeting request and it displays the “Appointment Summary” in subject of the email. So, could you please try updating Appointment.Summary property to contain the “Updated: xxxxxxxx” text. This should resolve display problem in Outlook.

As far as other email clients are concerned e.g. GMail, Hotmail or web interface of Exchange Server, it displays both subject of the email and appointment summary. So, MailMessage.Subject works in this case.

Hi Saqib Razzaq

If you will run tests in outlook you will find that subject of email when send update is "Updated: xxxx" but summary of appointment is 'xxxx". But if i set summary of appointment "Updated: xxxx", appointment also will be with summary "Updated: xxxx" but i need it "xxxx" (like it work in outlook). so it dont work.

Hi,

Following is the code for testing in Microsoft Outlook:

Create Appointment Request:
MailMessage msg = new MailMessage();
msg.Subject = “aaaaaaaaaaaaaaaaaaaaaa”; // it is never displayed in outlook
Appointment appointment = new Appointment(…);
strAppointmentID = appointment.UniqueId; // save it for later updating it
appointment.Summary = “appointment summary”; // this text will be displayed in Subject in Outlook

Update Appointment Request:
MailMessage msg = new MailMessage();
msg.Subject = “bbbbbbbbbbbbbbbb”; // again, its never displayed in outlook
Appointment appointment = new Appointment(…);
appointment.UniqueId = strAppointmentID; // need UniqueID to update the appointment
appointment.Summary = “Updated: appointment summary”; // this text will be displayed in Subject in outlook

If you want to send subject without Updated: text, you need to set it as
appointment.Summary = “appointment summary”;

For proper appointment update, you need to assign the correct Appointment.UniqueId property. You can save it in some variable/DB when you create the first appointment. After that, whenever you want to update or cancel, you need to assign the saved UniqueID to Appointment.UniqueId.

Outlook never displays MailMessage.Subject. It only displays Appointment.Summary in subject line.

Please see the screenshot in Outlook that were produced using the code above.