You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2021/05/16 17:13:48 UTC

[sling-org-apache-sling-commons-messaging-mail] 01/05: SLING-10380 Headers support not working

This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-messaging-mail.git

commit e785b6d659e6e542682aaa5acca5b720ed2604d4
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Sun May 16 18:56:54 2021 +0200

    SLING-10380 Headers support not working
    
    pass headers to attachment
---
 .../sling/commons/messaging/mail/internal/SimpleMessageBuilder.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/commons/messaging/mail/internal/SimpleMessageBuilder.java b/src/main/java/org/apache/sling/commons/messaging/mail/internal/SimpleMessageBuilder.java
index 1ab9e27..1c4d010 100644
--- a/src/main/java/org/apache/sling/commons/messaging/mail/internal/SimpleMessageBuilder.java
+++ b/src/main/java/org/apache/sling/commons/messaging/mail/internal/SimpleMessageBuilder.java
@@ -330,7 +330,7 @@ public class SimpleMessageBuilder implements MessageBuilder {
 
     @Override
     public @NotNull MessageBuilder attachment(final byte @NotNull [] content, @NotNull final String type, @NotNull final String filename, @Nullable Header[] headers) {
-        final Attachment attachment = new Attachment(content, type, filename, null);
+        final Attachment attachment = new Attachment(content, type, filename, headers);
         this.attachments.add(attachment);
         return this;
     }