Skip to content

Commit

Permalink
MAILET-100 To replace a header, AddSubjectPrefix is supposed to remov…
Browse files Browse the repository at this point in the history
…e previous value
  • Loading branch information
mbaechler committed Sep 5, 2016
1 parent 1081d8f commit 27fb35d
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -57,6 +57,11 @@ public void init() throws MessagingException {
public void service(Mail mail) throws MessagingException {
MimeMessage m = mail.getMessage();
String newSubject = prefixSubject(m);
replaceSubject(m, newSubject);
}

private void replaceSubject(MimeMessage m, String newSubject) throws MessagingException {
m.setSubject(null);
m.setSubject(newSubject, Charsets.UTF_8.displayName());
}

Expand Down

0 comments on commit 27fb35d

Please sign in to comment.