0

I am using Spring framework. In my application, I want to call an ajax call in angular js to save the .msg file to the DB. In this case I am not able to send the File to the java class so I am sending the Base64 String of it. Now I want to fetch some details from the attached mail like Sender email Id, Subject etc. What are the ways I can do this in java?

Sanil Jain
  • 157
  • 1
  • 1
  • 4
  • You'd have to decode the string using `java.util.Base64.getDecoder().decode(msg)`, then you would need to analyze the decoded msg and retrieve the data you need – vc73 Apr 16 '19 at 08:45
  • that is what I am asking. is there any jar which I can use to fetch all the details from the decoded base64? – Sanil Jain Apr 16 '19 at 10:06
  • Possible duplicate of [java mail Base64 encoded string to image attachment](https://stackoverflow.com/questions/28981724/java-mail-base64-encoded-string-to-image-attachment) – Mebin Joe Apr 16 '19 at 11:02
  • @MebinJoe No. Not duplicate – Sanil Jain Apr 30 '19 at 11:56

0 Answers0