Exception converting .eml to .msg for meeting with non-US date

I'm using Aspose.Email to convert .eml files to .msg files. I've encountered a couple of cases where converting a meeting message with specific content (or lack thereof) will generate an exception.

I'm using this code to do the conversion

MailMessage msg = MailMessage.Load("file.eml", MessageFormat.Eml);

msg.Save("file.msg",MailMessageSaveType.OutlookMessageFormat); <-generates exception

In this case, I have a text/calendar MIME section in the .eml file that has a recurrence entry which has a TimeZone parameter. If the TZID is as shown below, I get an exception with a message of String was not recognized as a valid DateTime (the line may be wrapped here in the forum but it is all on one line in the file).

RECURRENCE-ID;TZID="(UTC+01:00) Brussels, Copenhagen, Madrid, Paris":20130325T143000

If, however, I change that line so that the TZID is: Eastern Standard Time, the conversion works.

RECURRENCE-ID;TZID=Eastern Standard Time:20130325T143000

Here's the full text/calendar section (I know there is a mix of Time zones in the file. It still seems to hinge on the recurrence item)

Content-Type: text/calendar; charset="utf-8"; method=REQUEST
Content-Transfer-Encoding: 8bit

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Eastern Standard Time
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;CN=ES1TU 000003:MAILTO:ES1TU000003@customer.local
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=ES1TU 0000
04:MAILTO:ES1TU000004@customer.local
DESCRIPTION;LANGUAGE=en-US:When: 13 April 2013 08:00-08:30 (UTC-05:00) East
ern Time (US & Canada).\nWhere: my office\n\n*~*~*~*~*~*~*~*~*~*\n\nThis i
s first test\n\n
SUMMARY;LANGUAGE=en-US:test meeting
DTSTART;TZID=Eastern Standard Time:20130413T080000
DTEND;TZID=Eastern Standard Time:20130413T083000
UID:040000008200E00074C5B7101A82E008000000000043F24A5B2CCE01000000000000000
0100000003B1B807E8E7E4C4AAED6C88159B2ADFC
RECURRENCE-ID;TZID="(UTC+01:00) Brussels, Copenhagen, Madrid, Paris":20130325T143000
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20130329T125625Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
LOCATION;LANGUAGE=en-US:my office
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-OWNERAPPTID:-1357039651
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DISALLOW-COUNTER:FALSE
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR

Hi Tom,


Thank you for providing the complete text.

I have logged this issue as NETWORKNET-33735 in our issue tracking system, as I was able to observe the same issue at my end. It will be further investigated by our development team and once the solution is available, you will be automatically notified here via this forum.

The issues you have found earlier (filed as NETWORKNET-33735) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.