Unverified Commit 07f9e91d authored by Martin Lowe's avatar Martin Lowe 🇨🇦 Committed by GitHub
Browse files

Add reply-to support to mailer service (#326)

parent 0ebc0892
...@@ -50,6 +50,10 @@ public class DefaultMailerService implements MailerService { ...@@ -50,6 +50,10 @@ public class DefaultMailerService implements MailerService {
Optional<List<String>> authorMessageMailboxBcc; Optional<List<String>> authorMessageMailboxBcc;
@ConfigProperty(name = "eclipse.mailer.membership.membership-message.bcc") @ConfigProperty(name = "eclipse.mailer.membership.membership-message.bcc")
Optional<List<String>> membershipMessageMailboxBcc; Optional<List<String>> membershipMessageMailboxBcc;
@ConfigProperty(name = "eclipse.mailer.membership.author-message.reply-to")
Optional<String> authorMessageReplyTo;
@ConfigProperty(name = "eclipse.mailer.membership.membership-message.reply-to")
Optional<String> membershipMessageReplyTo;
@ConfigProperty(name = "eclipse.mailer.membership.doc-storage-root", defaultValue = "/tmp") @ConfigProperty(name = "eclipse.mailer.membership.doc-storage-root", defaultValue = "/tmp")
String temporaryDocumentStorage; String temporaryDocumentStorage;
...@@ -83,6 +87,9 @@ public class DefaultMailerService implements MailerService { ...@@ -83,6 +87,9 @@ public class DefaultMailerService implements MailerService {
if (!authorMessageMailboxBcc.isEmpty()) { if (!authorMessageMailboxBcc.isEmpty()) {
m.setBcc(authorMessageMailboxBcc.get()); m.setBcc(authorMessageMailboxBcc.get());
} }
if (authorMessageReplyTo.isPresent()) {
m.setReplyTo(authorMessageReplyTo.get());
}
mailer.send(m); mailer.send(m);
} }
...@@ -101,6 +108,9 @@ public class DefaultMailerService implements MailerService { ...@@ -101,6 +108,9 @@ public class DefaultMailerService implements MailerService {
if (!membershipMessageMailboxBcc.isEmpty()) { if (!membershipMessageMailboxBcc.isEmpty()) {
m.setBcc(membershipMessageMailboxBcc.get()); m.setBcc(membershipMessageMailboxBcc.get());
} }
if (membershipMessageReplyTo.isPresent()) {
m.setReplyTo(membershipMessageReplyTo.get());
}
// add the PDF attachment // add the PDF attachment
m.addAttachment("membership-enrollment-" + generateName(defaultPrin).toLowerCase().replace(" ", "-") + ".pdf", m.addAttachment("membership-enrollment-" + generateName(defaultPrin).toLowerCase().replace(" ", "-") + ".pdf",
renderHTMLPDF( renderHTMLPDF(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment