Keep POP3 sent identity

This commit is contained in:
M66B 2022-07-21 21:52:43 +02:00
parent 40cec95717
commit bc55e33f64
1 changed files with 6 additions and 4 deletions

View File

@ -534,6 +534,10 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
if (message.identity == null)
throw new IllegalArgumentException("Send without identity");
if (!message.content)
throw new IllegalArgumentException("Message body missing");
EntityAccount account = db.account().getAccount(message.account);
EntityIdentity ident = db.identity().getIdentity(message.identity);
if (ident == null)
@ -541,9 +545,6 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
if (!ident.synchronize)
throw new IllegalArgumentException("Identity is disabled");
if (!message.content)
throw new IllegalArgumentException("Message body missing");
// Update message ID
if (message.from != null && message.from.length > 0) {
String from = ((InternetAddress) message.from[0]).getAddress();
@ -616,7 +617,8 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
message.id = null;
message.folder = sent.id;
message.identity = null;
if (account != null && account.protocol == EntityAccount.TYPE_IMAP)
message.identity = null;
message.from = helper.getFrom();
message.cc = helper.getCc();
message.bcc = helper.getBcc();