Error in search function. "The specified content disposition is invalid."

Topics: Help requests, Issues
Mar 13, 2015 at 12:33 PM

i got an Error if i try to Search in my Inbox. I dont understand it, because most of the time it worked and now it doesnt work anymore..

$maxMessageSeachSize = 5000
Add-Type -Path "$($workspace)\ImapX.dll"
[ImapX.ImapClient] $client = New-Object -TypeName "ImapX.ImapClient" -ArgumentList ""

    Add-LogEntry "Erfolgreich mit IMAP Server verbunden"
        Add-LogEntry "Login erfolgreich`n"
        [ImapX.Folder]$f_inbox = $client.Folders.Inbox
        #[ImapX.Folder]$f_sysmsg = $client.Folders.Inbox.SubFolders["XXX"]
        $messages = $f_inbox.Search("ALL", [ImapX.Enums.MessageFetchMode]::Basic, $maxMessageSeachSize)   <<< Here i got that exception 

more code, which is irrelevant

Exception calling "Search" with "3" argument(s): "The specified content disposition is invalid."
At D:\Anwendungen\Powershell\xxx\xxx_xxx\xxx.ps1:108 char:30
  • $messages = $f_inbox.Search <<<< ("ALL", [ImapX.Enums.MessageFetchMode]::Basic, $maxMessageSeachSize)
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : DotNetMethodException__