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

Free Support Forum - aspose.com

Exception thrown loading email

Exception thrown loading .eml file:

java.lang.StringIndexOutOfBoundsException: String index out of range: 721
at java.lang.String.charAt(String.java:658)
at com.aspose.email.zape.a(SourceFile:598)
at com.aspose.email.MailMessage.setHtmlBody(SourceFile:1992)
at com.aspose.email.MailMessage.setHtmlBody(SourceFile:872)
at com.aspose.email.MailMessage.y(SourceFile:3870)
at com.aspose.email.MailMessage.a(SourceFile:3453)
at com.aspose.email.MailMessage.c(SourceFile:1442)
at com.aspose.email.MailMessage.load(SourceFile:1366)
at Load.main(Load.java:11)

Source and email:
[https://app.box.com/s/q212vefvhvdt3bc1grz5t5xscmndzfqn ](https://app.box.com/s/q212vefvhvdt3bc1grz5t5xscmndzfqn)

The issue seems to be the lack of an ‘=’ at the end of the second-to-last line of the body.

@intradyn

We have tested the scenario using the latest version of Aspose.Email for Java 22.4 and have not found the shared issue. So, please use Aspose.Email for Java 22.4.

It works. Thank you.