Skip to content

Commit

Permalink
Allow adding inline attachement using MailTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
glefloch authored and gsmet committed Jan 18, 2021
1 parent 77c63d8 commit ff81a4c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkus.mailer;

import java.io.File;
import java.util.concurrent.CompletionStage;

/**
Expand Down Expand Up @@ -48,6 +49,8 @@ interface MailTemplateInstance {

MailTemplateInstance bounceAddress(String bounceAddress);

MailTemplateInstance addInlineAttachment(String name, File file, String contentType, String contentId);

MailTemplateInstance data(String key, Object value);

CompletionStage<Void> send();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkus.mailer.runtime;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -78,6 +79,12 @@ public MailTemplateInstance bounceAddress(String bounceAddress) {
return this;
}

@Override
public MailTemplateInstance addInlineAttachment(String name, File file, String contentType, String contentId) {
this.mail.addInlineAttachment(name, file, contentType, contentId);
return this;
}

@Override
public MailTemplateInstance data(String key, Object value) {
this.data.put(key, value);
Expand Down

0 comments on commit ff81a4c

Please sign in to comment.