Hello,
I’m trying to load a vCalendar file into an Appointment object using the following code:
File icalFile = new File("sampleical2.txt");
InputStream stream = new FileInputStream(icalFile);
Appointment appointment = Appointment.load(stream); // <-- line which gets the error
I’m facing the following exception:
Exception in thread "main" class com.aspose.email.system.exceptions.FormatException: The specified string is not in the form required for an e-mail address.
com.aspose.email.MailAddress.g(SourceFile:867)
com.aspose.email.MailAddress.d(SourceFile:763)
com.aspose.email.MailAddress.<init>(SourceFile:139)
com.aspose.email.MailAddress.<init>(SourceFile:211)
com.aspose.email.zgy.a(SourceFile:787)
com.aspose.email.zgy.e(SourceFile:490)
com.aspose.email.zgy.b(SourceFile:232)
com.aspose.email.Appointment.a(SourceFile:1420)
com.aspose.email.Appointment.b(SourceFile:1362)
com.aspose.email.Appointment.load(SourceFile:1355)
TestProject.main(TestProject.java:40)
at com.aspose.email.MailAddress.g(SourceFile:867)
at com.aspose.email.MailAddress.d(SourceFile:763)
at com.aspose.email.MailAddress.<init>(SourceFile:139)
at com.aspose.email.MailAddress.<init>(SourceFile:211)
at com.aspose.email.zgy.a(SourceFile:787)
at com.aspose.email.zgy.e(SourceFile:490)
at com.aspose.email.zgy.b(SourceFile:232)
at com.aspose.email.Appointment.a(SourceFile:1420)
at com.aspose.email.Appointment.b(SourceFile:1362)
at com.aspose.email.Appointment.load(SourceFile:1355)
at TestProject.main(TestProject.java:40)
Please find attached the sampleical2.txt file.
sampleical2.zip (1.1 KB)
As soon as possible, let me know how I can solve this issue.
Thanks