Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE on ClientSubmitTime when original message has not been sent yet #25

Closed
bbottema opened this issue Jan 24, 2020 · 9 comments
Closed
Labels
Milestone

Comments

@bbottema
Copy link
Owner

Copied from bbottema/simple-java-mail#243

While investigating bbottema/outlook-message-parser#23 we found an issue with the OutlookMessage.getClientSubmitTime() method.

java.lang.NullPointerException
	at org.simplejavamail.outlookmessageparser.model.OutlookMessage.getClientSubmitTime(OutlookMessage.java:849)
	at org.simplejavamail.internal.outlooksupport.converter.OutlookEmailConverter.buildEmailFromOutlookMessage(OutlookEmailConverter.java:73)
	at org.simplejavamail.internal.outlooksupport.converter.OutlookEmailConverter.outlookMsgToEmailBuilder(OutlookEmailConverter.java:60)
	at org.simplejavamail.converter.EmailConverter.outlookMsgToEmailBuilder(EmailConverter.java:226)
	at org.simplejavamail.converter.EmailConverter.outlookMsgToEmail(EmailConverter.java:209)
	at org.simplejavamail.converter.EmailConverter.outlookMsgToEmail(EmailConverter.java:201)

The issue is present with the following test emails from the outlook-message-parser.

  • tst_unicode.msg
  • unsent draft.msg
  • chinese message.msg
  • forward with attachments and embedded images.msg
  • the nested mail from 'nested simple mail.msg'
@bbottema
Copy link
Owner Author

Released in 1.7.1

@Faelean
Copy link

Faelean commented Jan 24, 2020

Seems like this created another issue:
This is from the tst_unicode.msg

java.lang.IllegalArgumentException: Implicit NotNull argument 1 of org/simplejavamail/email/internal/EmailPopulatingBuilderImpl.to must not be null
	at org.simplejavamail.email.internal.EmailPopulatingBuilderImpl.to(EmailPopulatingBuilderImpl.java)
	at org.simplejavamail.internal.outlooksupport.converter.OutlookEmailConverter.copyReceiversFromOutlookMessage(OutlookEmailConverter.java:97)
	at org.simplejavamail.internal.outlooksupport.converter.OutlookEmailConverter.buildEmailFromOutlookMessage(OutlookEmailConverter.java:77)
	at org.simplejavamail.internal.outlooksupport.converter.OutlookEmailConverter.outlookMsgToEmailBuilder(OutlookEmailConverter.java:60)
	at org.simplejavamail.converter.EmailConverter.outlookMsgToEmailBuilder(EmailConverter.java:226)
	at org.simplejavamail.converter.EmailConverter.outlookMsgToEmail(EmailConverter.java:209)
	at org.simplejavamail.converter.EmailConverter.outlookMsgToEmail(EmailConverter.java:201)

Second thing, I don't know if this might be a seperate issue:
Using the unsent draft.msg, the sender looks like this:

image

@bbottema
Copy link
Owner Author

bbottema commented Jan 24, 2020

Seems like this created another issue:
This is from the tst_unicode.msg

How do I reproduce this, @Faelean?

Second thing, I don't know if this might be a seperate issue:

I'll have a look, thanks for the heads up. Quick question, this worked for you previously or you just noticed it now?

@Faelean
Copy link

Faelean commented Jan 24, 2020

Seems like this created another issue:
This is from the tst_unicode.msg

How do I reproduce this, @Faelean?

I haven't change anything in my code, the two mails creating issues are the same as before. I haven't seen this issue because of the NullPointer.

@Faelean
Copy link

Faelean commented Jan 24, 2020

Sorry I missunderstood, I commented here because you 'moved' the issue in Simple Java Mail here, the original call is EmailConverter.outlookMsgToEmail(stream) from Simple Java Mail.

@bbottema
Copy link
Owner Author

bbottema commented Jan 24, 2020

@Faelean as for the IllegalArgumentException, please refer to #26 (fix released in 1.7.2).

@bbottema
Copy link
Owner Author

bbottema commented Jan 24, 2020

As for the other issue, I suspect this is an Outlook version problem where the properties work differently. This is an email that doesn't have a sent-address (yet), but the property for it is still encoded with a garbage value.

I'm not sure how to handle this yet.

@bbottema
Copy link
Owner Author

@Faelean as for garbage sender issue, please refer to #27 (fix released in 1.7.3).

@bbottema
Copy link
Owner Author

@Faelean, Simple Java Mail now uses 1.7.3 in release 6.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants