Removed FairEmail from headers

pull/162/head
M66B 5 years ago
parent 6e1dd04502
commit 4f4ab3a625

@ -37,7 +37,7 @@ import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.Random;
import java.util.UUID;
import javax.mail.Address;
import javax.mail.internet.InternetAddress;
@ -157,13 +157,7 @@ public class EntityMessage implements Serializable {
public Long last_attempt; // send
static String generateMessageId() {
StringBuilder sb = new StringBuilder();
sb.append('<')
.append(Math.abs(new Random().nextInt())).append('.')
.append(System.currentTimeMillis()).append('.')
.append(BuildConfig.APPLICATION_ID).append("@localhost")
.append('>');
return sb.toString();
return "<" + UUID.randomUUID() + "@localhost" + '>';
}
boolean replySelf(String via) {

@ -121,7 +121,7 @@ public class MessageHelper {
if (message.inreplyto != null)
imessage.addHeader("In-Reply-To", message.inreplyto);
imessage.addHeader("X-FairEmail-ID", message.msgid);
imessage.addHeader("X-Correlation-ID", message.msgid);
imessage.setFlag(Flags.Flag.SEEN, message.seen);
imessage.setFlag(Flags.Flag.FLAGGED, message.flagged);
@ -405,7 +405,7 @@ public class MessageHelper {
String getMessageID() throws MessagingException {
// Outlook outbox -> sent
String header = imessage.getHeader("X-FairEmail-ID", null);
String header = imessage.getHeader("X-Correlation-ID", null);
if (header == null)
header = imessage.getHeader("Message-ID", null);
return (header == null ? null : MimeUtility.unfold(header));

Loading…
Cancel
Save