The code checking that the image exists in the correct directory has a BUG and well it is overly complex (KISS). Just replace this method below...
public static boolean isFromAttachmentsFolder(str _pathName)
{ str attachmentsFolder; str pathName; ; // Fix embedding images in emails attachmentsFolder = SysEmailParameters::find().AttachmentsPath; pathName = _pathName; attachmentsFolder = Global::strReplace(attachmentsFolder,'\\','/'); pathName = Global::strReplace(pathName,'\\','/'); // Fix embedding images in emails return Global::strStartsWith(strupr(pathName), strupr(attachmentsFolder));
}
public static boolean isFromAttachmentsFolder(str _pathName)
{ str attachmentsFolder; str pathName; ; // Fix embedding images in emails attachmentsFolder = SysEmailParameters::find().AttachmentsPath; pathName = _pathName; attachmentsFolder = Global::strReplace(attachmentsFolder,'\\','/'); pathName = Global::strReplace(pathName,'\\','/'); // Fix embedding images in emails return Global::strStartsWith(strupr(pathName), strupr(attachmentsFolder));
}