All issues faced in Aspose.Email.dll (6.3)

Hello,

As I am using Aspose.Email.dll (6.3) and I am facing some issues as follows.
Failed to save message to MSG
when my message header contains Reply-To: entry.
It throws me following exception


The reply to address is not in a recognized format.

at Aspose.Email.Outlook.MapiMessage.set_ReplyTo(String value)

at Aspose.Email.Outlook.MapiMessage.#=qSQYE11Z06YgFk5u7m8XaTh1fjlhRNLqgt0SXkwF0ygg=(MailMessage #=q_1OM_N89SpquW223EsrvpA==, MapiMessage #=qEVnw5rAsp3cgip_Nne7EqQ==, MapiConversionOptions #=q$0eZfkZDkDCbjbbzpm67hQ==)

at Aspose.Email.Outlook.MapiMessage.#=qtOhVeJYiS_nFJFt$207yRg==(MailMessage #=q5q82L9ErlHQtfUntSDScXQ==, MapiConversionOptions #=q$0eZfkZDkDCbjbbzpm67hQ==)

at Aspose.Email.Outlook.MapiMessage.FromMailMessage(MailMessage message, MapiConversionOptions options)

at Aspose.Email.Mail.MailMessage.Save(Stream stream, SaveOptions options)

at Aspose.Email.Mail.MailMessage.Save(String fileName, SaveOptions options)

And it is unable to convert the mail to MSG.

Failed to add appointment to pst

for some appointment entries when I do

Aspose.Email.Mail.MailMessage mailMsg = new Aspose.Email.Mail.MailMessage();

mailMsg.AddAlternateView(appointment.RequestApointment());

it is giving me following error


Length cannot be less than zero.

Parameter name: length

ERROR2016-03-29 11:42:00 - Stack Strace :: at System.String.Substring(Int32 startIndex, Int32 length)

at ? .[1](List`1 [1])

at ? .[1](Stream [1])

at Aspose.Email.Mail.AlternateView.[1](String [1], Encoding

, ContentType , TransferEncoding )
at Aspose.Email.Mail.Appointment.[1](? [1], String

)
at Aspose.Email.Mail.Appointment.RequestApointment()

ASAP I will share sample with you.

Calendar recurrence is not proper.

There are not all possible options available to set the recurrence properties.

Failed to add display name without email address in calendar
I have some appointments having only the display name not a proper email addresses.

I am able to add them to MailAddressCollection using ignoreSmtpCheck as true.

but when I do RequestApointment it throws me an exception


Invalid URI: The hostname could not be parsed.

As I know that the email address should be proper but that will not be the always. I have samples with display names.

Is there any solution to add only display names?

How to assign HTML description / RTF description to calendar

Is there any way to say that the calendar content is html?

Above are some critical bugs that I am facing now. I am still testing it. But it will be great if you can see them on priority basis. As you can see all are the basic thing s that should work.

Waiting for your reply.

Thank you.

Regards ,

Shital Diwate

Hi Shital,

Thank you for contacting Aspose Suppor team.

1. This issue you have already reported here
and we have linked it with the logged ticket. Once the fix version is
available for download, you will be automatically notified via the
respective thread.

2. We have already requested the sample file
from you on your other thread. Please share the sample file with us so
that we can assist you further in this regard.

3. Can you please share what recurrence properties you want to set? You may please consult our Product documentation section, Working with Recurrences, for having more information about different types of recurrences.

4. Please use the following sample code to set calendar contents to HTML.

Sample Code:

// Create the appointment
MapiCalendar calendar = new MapiCalendar(
“LAKE ARGYLE WA 6743”,
“Appointment”,
“This is a very important meeting :)”,
new DateTime(2012, 10, 2, 13, 0, 0),
new DateTime(2012, 10, 2, 14, 0, 0));

calendar.SetBodyContent(“

Heading
3

”, BodyContentType.Html);

calendar.Save(“CalendarItem.msg”, AppointmentSaveFormat.Msg);

Hi Shital,


I have tested your sample ICS file using following sample code but observed no issue. Could you please verify if you have sent the correct sample ICS file? Please give a try to the following sample code and share the feedback. If issue is not resolved, please send us a complete sample project along with the sample ICS file which can be used to re-produce scenario here and provide assistance accordingly.

MailMessage msg = new MailMessage();

Appointment.Load(@"パンチ、次の3日間に最初の人はRa.OneまたはRSのクロスワードバウチャー用映画のチケットを取得します。 300 - 私のiPhoneから送信 .ics");

msg.AddAlternateView(app.RequestApointment());

Hello Kashif ,

Thank you for your reply.
I am assigning properties and then create the appointment.to give you sample I created the ics file.

Sample code for how I am using the library is as follows.

DateTime startDate = DateTime.MinValue;
DateTime endDate = DateTime.MaxValue;
string subject = string.Empty;
string location = string.Empty;
string body = string.Empty;
Appointment objAppointment = null;
MailMessage objMsg = null;
MailAddressCollection objMailAddressColl = new MailAddressCollection();
try
{
    startDate = DateTime.Parse("11/25/2011 12:00:00 AM");
    endDate = DateTime.Parse("11/26/2011 12:00:00 AM");
    location = "uk";
    
    subject = " subject value";
    
    objAppointment = new Appointment(location, subject, body, startDate,
    endDate, null,
    objMailAddressColl);
    
    objAppointment.Flags = new AppointmentFlags();
    
    objMsg = new MailMessage();
    objMsg.AddAlternateView(objAppointment.RequestApointment());
}
catch (Exception ex) { }

in my case when I am calling AddAliternateView it given me the error

Length cannot be less than zero.
Parameter name: length
stackTrace:
at System.String.Substring(Int32 startIndex, Int32 length)
at #=qsxQ3npwcou_TRXPzkWEgMoygsCyCuNmLACoEolIJrPhyGcGaWmDgtgxvs$miwxaEI9UnPyR1GonZgBmM_HBwuA==.#=qXe9Cq6tptVk_vsCktVZJ_w==(List`1 #=q77rkM59xqtNuVwIGL_gKVw==)
at #=qQGUVTcdxyPOHmTccKvxp9loCNdd8eNbAvNfvp935rhOysEbORUYShb3bnHFCg34M.#=qVG_h1FGwdW1okJ7AIyDPoQ==(Stream #=qoSIefBld6v$LlJh0w7794g==)
at Aspose.Email.Mail.AlternateView.#=q5yKzm8HiMPEGpq8R3CRbNcGeofBOhy3vpxPOOx$qP_0=(String #=qzKeUzz3O$5XAqjWYP$6L1A==, Encoding #=q0B3xeaOqhNQ2evMoLAswHQ==, ContentType #=q9tk_ufpMdcZD9i7XQimhFg==, TransferEncoding #=qqO_$Xmvqa$M75y4LG0$2Kk0Xxisi7VfHMf3LyGZcf2k=)
at Aspose.Email.Mail.Appointment.#=qNRDj1zklN7P2RcLyroePEGMwmCasfoybkcQvnMRyZ$0=(#=qQGUVTcdxyPOHmTccKvxp9loCNdd8eNbAvNfvp935rhOysEbORUYShb3bnHFCg34M #=q8WJNHBsLwn5QZPdrI_A7ig==, String #=qBkZ2N2Jk4HRQxPgl8ddrdA==)
at Aspose.Email.Mail.Appointment.RequestApointment()
at PSTWriter.ASPOSEWriter.saveAppoinmentToPST(AppointmentItem p_AppointmentObj, String p_FolderPath, FolderType p_FolderType)

I observe that the issue is with subject.
When I changed the subject value it works properly.

subject value for which it is giving exception is as follows

"パンチ、次の3日間に最初の人はRa.OneまたはRSのクロスワードバウチャー用映画のチケットを取得します。 300 / -

私のiPhoneから送信

パンチ、次の3日間に最初の人はRa.OneまたはRSのクロスワードバウチャー用映画のチケットを取得します。 300 / -

私のiPhoneから送信

パンチ、次の3パンチ、次の3"

I think it will give you some idea about the issue.

Failed to add display name without email address in calendar

I have some appointments having only the display name not a proper email addresses.
I am able to add them to MailAddressCollection using ignoreSmtpCheck as true.
but when I do RequestApointment it throws me an exception

Invalid URI: The hostname could not be parsed.

As I know that the email address should be proper but that will not be the always. I have samples with display names.
Is there any solution to add only display names?
following is the sample code for this

DateTime startDate = DateTime.MinValue;
DateTime endDate = DateTime.MaxValue;
string subject = string.Empty;
string location = string.Empty;
string body = string.Empty;
Appointment objAppointment = null;
MailMessage objMsg = null;
MailAddressCollection objMailAddressColl = new MailAddressCollection();
try
{
    startDate = DateTime.Parse("11/25/2011 12:00:00 AM");
    endDate = DateTime.Parse("11/26/2011 12:00:00 AM");
    location = "uk";
    
    subject = "test subject";
    
    objAppointment = new Appointment(location, subject, body, startDate,
    endDate, null,
    objMailAddressColl);
    objAppointment.Organizer = new MailAddress(" user display name", true);
    
    objAppointment.Flags = new AppointmentFlags();
    
    objMsg = new MailMessage();
    objMsg.AddAlternateView(objAppointment.RequestApointment());
}
catch (Exception ex) { }

Hi Shital,

Thank you for sharing your feedback.

Unfortunately, we are still unable to reproduce the issue at our end. We have tried both of your sample codes at our end and none of these raised an exception. Could you please:

1. Make sure that you are actually using v 6.3.0 of the API?

2. Provide us with a sample console application that we could use to reproduce the problem at our end for assisting you further?

We’ll look into your feedback and investigate the issue further at our end.