support.js - Emails fail to save if other emails attached

I was just wondering if anyone had any suggestions for an error I am experiencing with the support.js script for the EmailManager service.

We are running Sage 200 CRM 7.1.g

When we receive emails with attachments such as images/pdf/word docs etc it works perfectly.

However, when there is another email attached it will throw an error and the email will not get filed and will be placed in the Rogue folder.

The error message originates in the SaveAttachments function….

function SaveAttachments(DestFolder, bCreateLibrRec)
{
var Attachments = eMail.Attachments;

var libdir = Attachments.LibraryPath + "\\" + DestFolder;

var AttItem;
// Library records...attachments
for (i = 0; i
{
// Saving the attachment here
AttItem = Attachments.Items(i);
// Getting a new name for it
if (AttItem.Name != "_alt.0")
{
NewName = MsgHandler.GetUniqueFileName(libdir, AttItem.Name);
// Saving to the library...
jscript error: The path %1 could not be found Line: 499 Char: 6
AttItem.SaveAs(NewName, libdir);
if (bCreateLibrRec == true)
SaveLibrRecord(DestFolder + "/", NewName);
bHasAttachments = true;
}
}
}