IDEMPIERE-2864 Alert Processor vs Attachment File system can't send EMails properly
This commit is contained in:
parent
ce07ca20db
commit
383c35dc4a
|
@ -93,11 +93,12 @@ public class AttachmentFileSystem implements IAttachmentStore {
|
|||
in.transferTo(0, in.size(), out);
|
||||
in.close();
|
||||
out.close();
|
||||
/* IDEMPIERE-2864
|
||||
if(entryFile.exists()){
|
||||
if(!entryFile.delete()){
|
||||
entryFile.deleteOnExit();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
entryFile = destFile;
|
||||
|
||||
} catch (IOException e) {
|
||||
|
|
|
@ -228,6 +228,13 @@ public class AlertProcessor extends AdempiereServer
|
|||
Collection<Integer> users = alert.getRecipientUsers();
|
||||
int countMail = notifyUsers(users, alert.getAlertSubject(), message.toString(), attachments);
|
||||
|
||||
// IDEMPIERE-2864
|
||||
for(File attachment : attachments)
|
||||
{
|
||||
if(attachment.exists() && !attachment.delete())
|
||||
attachment.deleteOnExit();
|
||||
}
|
||||
|
||||
m_summary.append(alert.getName()).append(" (EMails+Notes=").append(countMail).append(") - ");
|
||||
return valid;
|
||||
} // processAlert
|
||||
|
|
|
@ -277,6 +277,13 @@ public class Scheduler extends AdempiereServer
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
// IDEMPIERE-2864
|
||||
for(File file : fileList)
|
||||
{
|
||||
if(file.exists() && !file.delete())
|
||||
file.deleteOnExit();
|
||||
}
|
||||
}
|
||||
|
||||
return pi.getSummary();
|
||||
|
|
Loading…
Reference in New Issue