mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
IMAP: switch to UUID for message names generation on APPEND
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@320 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
25861371db
commit
92b49f65b3
@ -17,7 +17,7 @@ import java.net.SocketTimeoutException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Dav Gateway smtp connection implementation.
|
||||
@ -27,8 +27,6 @@ public class ImapConnection extends AbstractConnection {
|
||||
protected static final int INITIAL = 0;
|
||||
protected static final int AUTHENTICATED = 2;
|
||||
|
||||
protected Random random = new Random();
|
||||
|
||||
ExchangeSession.Folder currentFolder;
|
||||
ExchangeSession.MessageList messages;
|
||||
|
||||
@ -400,8 +398,8 @@ public class ImapConnection extends AbstractConnection {
|
||||
// empty line
|
||||
readClient();
|
||||
|
||||
String mailName = Long.toHexString(System.currentTimeMillis()) + Long.toHexString(random.nextLong());
|
||||
session.createMessage(session.getFolderPath(folderName), mailName, null, new String(buffer), false);
|
||||
String messageName = UUID.randomUUID().toString();
|
||||
session.createMessage(session.getFolderPath(folderName), messageName, null, new String(buffer), false);
|
||||
sendClient(commandId + " OK APPEND completed");
|
||||
} else if ("noop".equalsIgnoreCase(command) || "check".equalsIgnoreCase(command)) {
|
||||
if (currentFolder != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user