Hey,
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..
Code:
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
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..
Code:
$maxMessageSeachSize = 5000
Add-Type -Path "$($workspace)\ImapX.dll"
[ImapX.ImapClient] $client = New-Object -TypeName "ImapX.ImapClient" -ArgumentList "imap.xxx.net"
if($client.Connect())
{
Add-LogEntry "Erfolgreich mit IMAP Server verbunden"
$client.Behavior.set_MessageFetchMode([Imapx.Enums.MessageFetchMode]::Basic)
if($client.Login("XXX@XXX.net","XXX"))
{
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
__Error: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__