Gmail.ps
Gmail.ps copied to clipboard
Get-Message doesn't work without any optional parameters
Would it make sense to have sensible defaults of $imap = @('SEEN','UNSEEN')
if no other parameters are specified (I assume this will return all messages)?.
I can add a PR if that's a reasonable way to go about it.
The full exception:
PS C:\Users\administrator> $Session | Get-Mailbox 'Inbox' | Get-Message
Exception calling "Search" with "1" argument(s): "xm003 BAD Could not parse command"
At C:\Users\administrator\Documents\WindowsPowerShell\Modules\Gmail.ps\Gmail.ps.psm1:344 char:5
+ $result = $Session.Search('(' + $criteria + ')');
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : Exception
As I mentioned in other issue, use a pull request to add this feature.