Read Gmail emails using Powershell Read Gmail emails using Powershell powershell powershell

Read Gmail emails using Powershell


According to this documentation one could define format with the value full or raw:

Optional query parameters format string The format to return the message in.

Acceptable values are:

"full": Returns the full email message data with body content parsed in the payload field; the raw field is not used. (default)"raw": Returns the full email message data with body content in the raw field as a base64url encoded string; the payload field is not used. 


Please change code under #display only sender name and message title as custom table

to:

$format= @{Expression={$_.title};Label="Title"},         @{Expression={$_.author.name};Label="Author"},          @{Expression={$_.summary};Label="Body"}

In XML file email body is saved under summary tag.