|
|
|
@ -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();
|
|
|
|
|