Skip to content

Commit d7b92f9

Browse files
the-glusurli
andcommitted
XWIKI-20109: Notification headers for autoreplies
Added common headers to notification emails to prevent autoresponses from various emails autoreply (cherry picked from commit a9b3cde) Co-Authored-By: Simon Urli <simon.urli@xwiki.com> (cherry picked from commit d1b0438)
1 parent 530aee6 commit d7b92f9

File tree

1 file changed

+2
-0
lines changed
  • xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-notifiers/xwiki-platform-notifications-notifiers-default/src/main/java/org/xwiki/notifications/notifiers/internal/email

1 file changed

+2
-0
lines changed

xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-notifiers/xwiki-platform-notifications-notifiers-default/src/main/java/org/xwiki/notifications/notifiers/internal/email/AbstractMimeMessageIterator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,8 @@ public MimeMessage next()
426426
updateFactoryParameters(templateDocumentReference);
427427
message = ExtendedMimeMessage.wrap(this.factory.createMessage(templateDocumentReference,
428428
this.factoryParameters));
429+
message.setHeader("Auto-Submitted", "auto-generated");
430+
message.setHeader("X-Auto-Response-Suppress", "All");
429431

430432
List<EntityEvent> events = new ArrayList<>();
431433
this.currentEvents.forEach(

0 commit comments

Comments
 (0)