FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Nullpointer in SMIMESupport.isMimeMessageAttachment · Issue #572 · bbottema/simple-java-mail · GitHub

Nullpointer in SMIMESupport.isMimeMessageAttachment #572

Description

I'm getting a NullPointer exception when trying to parse the attached mail (had to use a zip because apparently GitHub doesn't allow msg files anymore).

MSG-Datei_T24-03167.zip

        String msgFileName = ".\\assets_sjm\\T24-03167.msg";

        try (FileInputStream fileInputStream = new FileInputStream(msgFileName)) {

            Email email = EmailConverter.outlookMsgToEmail(fileInputStream);
            System.out.println("Sent Date: " + email.getSentDate());
        }

This is the StackTrace I get when using the code above and 8.12.4

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.simplejavamail.api.email.AttachmentResource.getDataSource()" because "attachment" is null
	at org.simplejavamail.internal.smimesupport.SMIMESupport.isMimeMessageAttachment(SMIMESupport.java:212)
	at org.simplejavamail.internal.smimesupport.SMIMESupport.decryptAttachments(SMIMESupport.java:204)
	at org.simplejavamail.internal.smimesupport.SMIMESupport.decryptAttachments(SMIMESupport.java:131)
	at org.simplejavamail.internal.smimesupport.SMIMESupport.decryptAttachments(SMIMESupport.java:100)
	at org.simplejavamail.converter.EmailConverter.decryptAttachments(EmailConverter.java:257)
	at org.simplejavamail.converter.EmailConverter.outlookMsgToEmailBuilder(EmailConverter.java:251)
	at org.simplejavamail.converter.EmailConverter.outlookMsgToEmail(EmailConverter.java:228)
	at org.simplejavamail.converter.EmailConverter.outlookMsgToEmail(EmailConverter.java:220)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL