Describe the bug
During the usage of the imap mail connector a null pointer exception is thrown when using an EmailQuery object to search for an email.
To Reproduce
Steps to reproduce the behavior:
Use an ImapMailConnector
Send & recieve an email
Create an EmailQuery object and set a search term
Create an Optional of Email and use findFirst() using the query
Inside the method readMessageContents() in Email a null pointer exception is thrown in line 166 while accessing the Part object
Expected behavior
An Email object should be created and an Optional should be returned.
Actual behavior
A null pointer exception is thrown.
Test
EmailQuery query = new EmailQuery().setSearchTerm(new AndTerm(new SubjectTerm("test form"), new BodyTerm(currentDate)));
Optional<Email> foundEmailOptional = imap.query(query).findFirst();
Environment
Testerra 2.6 (in Testerra 2.4 the code works as expected)
Describe the bug During the usage of the imap mail connector a null pointer exception is thrown when using an
EmailQuery
object to search for an email.To Reproduce Steps to reproduce the behavior:
EmailQuery
object and set a search termEmail
and usefindFirst()
using the queryreadMessageContents()
inEmail
a null pointer exception is thrown in line 166 while accessing thePart
objectExpected behavior An Email object should be created and an Optional should be returned.
Actual behavior A null pointer exception is thrown.
Test
Environment