We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Re:Issues whil saving calendar item into msg file

Hi
I am saving calendar item into msg file in following way.

Appointment f_AppoinmentObj = new Appointment(
“Meeting Room 3 at Office Headquarters”, // Location
“Monthly Meeting”, // Summary
“Please confirm your availability.”, // Description
Start,
End,
"from@domain.com", // Organizer
"attendees@domain.com"); // Attendees
MailMessage f_MailMessage = new MailMessage();
f_MailMessage.AddAlternateView(f_AppoinmentObj.RequestApointment());
MapiMessage mapimsg = MapiMessage.FromMailMessage(f_MailMessage);
mapimsg.Save(“MyCalendar.msg”);


I am able to create msg file.But the Sent date appears that too the current date time as you can see in attachment given.

Please find the attachment "MyCalendar.png"

Thanks
Amol



Hi Amol,


Please save the appointment in draft format in case you don’t want it to be saved in sent form. I have modified your code sample as follow to achieve this. Please let us know if this doesn’t meet your requirements.

Sample Code:

<span style=“font-size:
10.0pt;font-family:“Courier New”;color:teal;mso-no-proof:yes”>Appointment<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”>
f_AppoinmentObj = new Appointment(<o:p></o:p>

"Meeting Room 3 at Office Headquarters", // Location

"Monthly Meeting", // Summary

"Please confirm your availability.", // Description

DateTime.Now.AddHours(1),

DateTime.Now.AddHours(2),

"from@domain.com", // Organizer

"attendees@domain.com"); // Attendees

f_AppoinmentObj.Method = AppointmentMethodType.Publish;

MailMessage f_MailMessage = new MailMessage();

f_MailMessage.AddAlternateView(f_AppoinmentObj.RequestApointment());

MapiMessage mapimsg = MapiMessage.FromMailMessage(f_MailMessage);

mapimsg.Save("MyCalendar.msg");


Hi

It worked for me.

But as I need to convert mail from other mail client to pst
I have cn values in some email address which
I need to set in MailAddress collection.


MailAddress f_MailAdddr = new MailAddress(“CN=Meimei Cheung/OU=Bsg/O=MetLife/C=US”)
//these are cn values getting from source
// if Itry to skip setting email address keeping the field empty
//still it gives exceptionn.


It gives exception when I set such emailaddress or if I give an empty string it still does the same.

So I am not able to save such appointments could you please gicve any solution.

Thanks
Amol


Hi Amol,


We are sorry for the delayed response.

I would request you to please create a new thread for this issue and attach a sample message for our investigation. Currently, the mail address format supports only the standard mail format address, but this can be investigated further for such information and forwarded to development team for consideration.

Hi Amol,

amol@systools:
Hi

or if I give an empty string it still does the same.


Please use the MapiMessage.Recipients.Clear() to save the message without any recipients.