We are trying to add a large attachment of size greater than 1.5GB to a mail using aspose. But the code is getting stuck and not completing even after waiting for hours.
Providing sample code below
String name = "testFile"; // test file with size above 1.5GB (any format)
InputStream fin = new FileInputStream("src/test/resources/" + name); // if running from maven or gradle project
MailMessage mailMessage = new MailMessage();
Attachment attachFile = new Attachment(fin, name);
mailMessage.addAttachment(attachFile);
SaveOptions saveOptions = SaveOptions.createSaveOptions(MailMessageSaveType.getOutlookMessageFormatUnicode());
mailMessage.save("testFile.msg", saveOptions);
Any idea why aspose is library is getting stuck in the new Attachment object call ?
Help appreciated.