Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send-GmailMessage fails to build MimeMessage #20

Closed
scrthq opened this issue Mar 1, 2018 · 1 comment
Closed

Send-GmailMessage fails to build MimeMessage #20

scrthq opened this issue Mar 1, 2018 · 1 comment
Assignees
Labels

Comments

@scrthq
Copy link
Member

scrthq commented Mar 1, 2018

Error:

Send-GmailMessage -Subject testing -Body 'Testing more' -To nate@scrthq.com
New-MimeMessage : Cannot process argument transformation on parameter 'Body'. Cannot convert value to type
System.String.
At line:110 char:32
+         $raw = New-MimeMessage @messageParams | Convert-Base64 -From  ...
+                                ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [New-MimeMessage], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,New-MimeMessage

Send-GmailMessage : Exception calling "Execute" with "0" argument(s): "Google.Apis.Requests.RequestError
Recipient address required [400]
Errors [
        Message[Recipient address required] Location[ - ] Reason[invalidArgument] Domain[global]
]
"
At line:1 char:1
+ Send-GmailMessage -Subject testing -Body 'Testing more' -To nate@scrt ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Send-GmailMessage

Fix to come in 2.1.6

@scrthq scrthq added the bug label Mar 1, 2018
@scrthq scrthq self-assigned this Mar 1, 2018
@scrthq
Copy link
Member Author

scrthq commented Mar 1, 2018

Resolved in 2.1.6:

PS > Send-GmailMessage -Subject testing -Body 'Testing more' -To nate@scrthq.com


User         : n@ferrell.io
HistoryId    :
Id           : xxxxxxxxxxxxxxxx
InternalDate :
LabelIds     : {UNREAD, SENT, INBOX}
Payload      :
Raw          :
SizeEstimate :
Snippet      :
ThreadId     : xxxxxxxxxxxxxxxx
ETag         : "YyKkEVixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7Ci28wo"

@scrthq scrthq closed this as completed Mar 1, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant