mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-14 08:39:50 +01:00
Support for Auto-Submitted header
This commit is contained in:
@@ -258,6 +258,9 @@ public class MessageHelper {
|
||||
if (message.unsubscribe != null)
|
||||
imessage.addHeader("List-Unsubscribe", "<" + message.unsubscribe + ">");
|
||||
|
||||
if (message.auto_submitted != null && message.auto_submitted)
|
||||
imessage.addHeader("Auto-Submitted", "auto-replied");
|
||||
|
||||
MailDateFormat mdf = new MailDateFormat();
|
||||
mdf.setTimeZone(hide_timezone ? TimeZone.getTimeZone("UTC") : TimeZone.getDefault());
|
||||
imessage.setHeader("Date", mdf.format(new Date()));
|
||||
@@ -1049,6 +1052,14 @@ public class MessageHelper {
|
||||
return priority;
|
||||
}
|
||||
|
||||
Boolean getAutoSubmitted() throws MessagingException {
|
||||
// https://tools.ietf.org/html/rfc3834
|
||||
String header = imessage.getHeader("Auto-Submitted", null);
|
||||
if (header == null)
|
||||
return null;
|
||||
return !"no".equalsIgnoreCase(header);
|
||||
}
|
||||
|
||||
boolean getReceiptRequested() throws MessagingException {
|
||||
ensureMessage(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user