Compare commits
No commits in common. "35a2a6c5184e948f52b2730e868b0f716e5f31ee" and "e43a8a72396310542ec860a17123745cff24aba5" have entirely different histories.
35a2a6c518
...
e43a8a7239
|
@ -7,10 +7,6 @@ kotlin {
|
|||
jvmToolchain(11)
|
||||
}
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
|
||||
val kotlinCoroutinesVersion: String by project
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ class MailReader(
|
|||
|
||||
fun listAllMessagesWithEInvoice(account: MailAccount, downloadMessageBody: Boolean = false, emailFolderName: String = "INBOX"): List<MailWithInvoice> {
|
||||
try {
|
||||
return connect(account) { store ->
|
||||
connect(account) { store ->
|
||||
val inbox = store.getFolder(emailFolderName)
|
||||
inbox.open(Folder.READ_ONLY)
|
||||
|
||||
|
@ -243,7 +243,7 @@ class MailReader(
|
|||
date.toInstant()
|
||||
|
||||
|
||||
private fun <T> connect(account: MailAccount, connected: (Store) -> T): T {
|
||||
private fun <T> connect(account: MailAccount, connected: (Store) -> T?): T? {
|
||||
val properties = mapAccountToJavaMailProperties(account)
|
||||
|
||||
val session = Session.getInstance(properties)
|
||||
|
|
|
@ -25,7 +25,7 @@ class MailReaderTest {
|
|||
|
||||
@Test
|
||||
fun listAllMessagesWithEInvoice() {
|
||||
val result = underTest.listAllMessagesWithEInvoice(mailAccount, true)
|
||||
val result = underTest.listAllMessagesWithEInvoice(mailAccount)
|
||||
|
||||
assertThat(result).isNotEmpty()
|
||||
|
||||
|
|
Loading…
Reference in New Issue