Open connection before attempting to download message via POP3
This commit is contained in:
parent
54f3d5f9a2
commit
876cabad70
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
package com.fsck.k9.backend.pop3
|
||||
|
||||
import com.fsck.k9.mail.FetchProfile
|
||||
import com.fsck.k9.mail.Folder.OPEN_MODE_RW
|
||||
import com.fsck.k9.mail.Message
|
||||
import com.fsck.k9.mail.store.pop3.Pop3Store
|
||||
|
||||
|
@ -9,8 +10,9 @@ internal class CommandFetchMessage(private val pop3Store: Pop3Store) {
|
|||
fun fetchMessage(folderServerId: String, messageServerId: String, fetchProfile: FetchProfile): Message {
|
||||
val folder = pop3Store.getFolder(folderServerId)
|
||||
try {
|
||||
val message = folder.getMessage(messageServerId)
|
||||
folder.open(OPEN_MODE_RW)
|
||||
|
||||
val message = folder.getMessage(messageServerId)
|
||||
folder.fetch(listOf(message), fetchProfile, null)
|
||||
|
||||
return message
|
||||
|
|
Loading…
Reference in a new issue