mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-30 14:50:14 -05:00
Switch to UUIDs for message-id generation. They're just as unique and lighter weight to calculate
This commit is contained in:
parent
95159d8121
commit
dc61614443
@ -11,6 +11,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Stack;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.james.mime4j.BodyDescriptor;
|
||||
import org.apache.james.mime4j.ContentHandler;
|
||||
@ -343,17 +344,7 @@ public class MimeMessage extends Message
|
||||
|
||||
private String generateMessageId()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("<");
|
||||
for (int i = 0; i < 24; i++)
|
||||
{
|
||||
sb.append(Integer.toString((int)(Math.random() * 35), 36));
|
||||
}
|
||||
sb.append(".");
|
||||
sb.append(Long.toString(System.currentTimeMillis()));
|
||||
sb.append("@email.android.com>");
|
||||
|
||||
return sb.toString();
|
||||
return "<"+UUID.randomUUID().toString()+"@email.android.com>";
|
||||
}
|
||||
|
||||
public void setMessageId(String messageId)
|
||||
|
Loading…
Reference in New Issue
Block a user