Skip to content

Commit

Permalink
Java Mail updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mubaldino committed Oct 21, 2022
1 parent 670edc1 commit 115a860
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.opensextant</groupId>
<version>3.6.0</version>
<version>3.6.1-SNAPSHOT</version>
<name>XText</name>
<artifactId>opensextant-xponents-xtext</artifactId>
<description>Content extraction simplified! Retrieve text, data and metadata from binary documents using Tika and
Expand Down Expand Up @@ -174,7 +174,7 @@
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.5.1</version>
<version>1.6.2</version>
</dependency>
<!-- Logback is nice and simple. -->
<dependency>
Expand Down Expand Up @@ -377,6 +377,7 @@
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<compilerVersion>1.8</compilerVersion>
<compilerArgument>-Xlint:all,-path</compilerArgument>
<showWarnings>true</showWarnings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ protected ConvertedDocument conversionImplementation(InputStream in, File doc)
textEncodings.clear();
try {
// Connect to the message file
//
MimeMessage msg = new MimeMessage(noSession, in);
return convertMimeMessage(msg, doc);
} catch (Exception xerr) {
Expand All @@ -116,11 +115,10 @@ protected ConvertedDocument conversionImplementation(InputStream in, File doc)
* @throws MessagingException on err
* @throws IOException on err
*/
public ConvertedDocument convertMimeMessage(Message msg, File doc) throws MessagingException,
public ConvertedDocument convertMimeMessage(MimeMessage msg, File doc) throws MessagingException,
IOException {
ConvertedDocument parentMsgDoc = new ConvertedDocument(doc);
parentMsgDoc.is_RFC822_attachment = true;
// parentMsgDoc.setEncoding(parseCharset(msg.getContentType()));

setMailAttributes(parentMsgDoc, msg);

Expand Down Expand Up @@ -148,7 +146,7 @@ public ConvertedDocument convertMimeMessage(Message msg, File doc) throws Messag
* @param message original mail message
* @throws MessagingException on err
*/
private void setMailAttributes(ConvertedDocument msgdoc, Message message) throws MessagingException {
private void setMailAttributes(ConvertedDocument msgdoc, MimeMessage message) throws MessagingException {
String msg_id = getMessageID(message);
if (msg_id == null) {
return;
Expand Down

0 comments on commit 115a860

Please sign in to comment.