1

Hi I am developing a functionality that sends emails to outlook accounts under company domain. I am using javax.mail:

        MimeMessage msg = new MimeMessage(session);
        msg.setRecipients("to", InternetAddress.parse(to));
        msg.setFrom(new InternetAddress(from));
        msg.setSubject(subject);
        msg.setSentDate(new Date());
        msg.setContent(content);
        Transport.send(msg);

I want my messages to be titled in Outlook like this: enter image description here

Is it possible to do? Is it possible to indicate C4 level of security somehow from java code?

1
  • Were you able to find the solution, we are also stuck here ? Commented Nov 20, 2023 at 14:15

1 Answer 1

0

Looks like you are interested in setting up MIP sensitivity label on the email. See C# - Add MIP specific headers to MailMessage for more information.

I'd recommend exploring the Outlook internals with labels set using MFCMAPI or OutlookSpy, so you could find what exactly should be set up for the message on the sender side.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi, please pay attention to tags, I did not mention C#, actually I think C# is the worst programming language in the world, it is slow and good for nothing :)
Ha-ha... Well, the syntax looks like C#, that is why I mentioned it in my response. I'd suggest exploring message internals (especially headers) to understand what is expected from your Java code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.