Update draft in place, revised compose

Fixes #36
This commit is contained in:
M66B
2018-08-13 11:22:57 +00:00
parent 951bdfab67
commit 52d72ca803
6 changed files with 148 additions and 199 deletions

View File

@@ -19,6 +19,8 @@ package eu.faircode.email;
Copyright 2018 by Marcel Bokhorst (M66B)
*/
import java.util.Random;
import javax.mail.Address;
import androidx.annotation.NonNull;
@@ -85,13 +87,12 @@ public class EntityMessage {
public Boolean ui_hide;
public String error;
String generateMessageId() {
static String generateMessageId() {
StringBuffer sb = new StringBuffer();
sb.append('<')
.append(id).append('.')
.append(BuildConfig.APPLICATION_ID).append('.')
.append(Math.abs(new Random().nextInt())).append('.')
.append(System.currentTimeMillis()).append('.')
.append("anonymous@localhost")
.append(BuildConfig.APPLICATION_ID).append("@localhost")
.append('>');
return sb.toString();
}