Support for Auto-Submitted header

This commit is contained in:
M66B
2020-10-02 15:54:45 +02:00
parent 06d206d491
commit b6aedc8e76
11 changed files with 2412 additions and 28 deletions

View File

@@ -418,6 +418,11 @@ public class EntityRule {
boolean cc = jargs.optBoolean("cc");
boolean attachments = jargs.optBoolean("attachments");
if (message.auto_submitted != null && message.auto_submitted) {
EntityLog.log(context, "Auto submitted rule=" + name);
return false;
}
if (!message.content)
EntityOperation.queue(context, message, EntityOperation.BODY);
@@ -477,6 +482,7 @@ public class EntityRule {
if (cc)
reply.cc = message.cc;
reply.unsubscribe = "mailto:" + identity.email;
reply.auto_submitted = true;
reply.subject = context.getString(
TextUtils.isEmpty(to) ? R.string.title_subject_reply : R.string.title_subject_forward,
message.subject == null ? "" : message.subject);