Skip to content

Commit

Permalink
Set mail.mime.decodefilename in `testAttachmentWithUTF8NameAndGreen…
Browse files Browse the repository at this point in the history
…MailApi`
  • Loading branch information
boris-petrov committed Mar 7, 2023
1 parent 9926878 commit e66399f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ public void messagesAdded(MessageCountEvent e) {
@Test
public void testAttachmentWithUTF8NameAndGreenMailApi() throws MessagingException, IOException {
greenMail.setUser("to@localhost", "pwd");
final IMAPStore store = greenMail.getImap().createStore();
final Session imapSession = greenMail.getImap().createSession();
imapSession.getProperties().setProperty("mail.mime.decodefilename", "true");
final IMAPStore store = (IMAPStore) imapSession.getStore();
store.connect("to@localhost", "pwd");
try {
Folder inboxFolder = store.getFolder("INBOX");
Expand Down

0 comments on commit e66399f

Please sign in to comment.