I'm try to send email using google gmail API. I've used Request body JSON with bearer token and Content-Type - message/rfc822.
Then I've used link below to send post request but I received the following errors.how to fix this issue ???
Post request Link -
https://www.googleapis.com/upload/gmail/v1/users/[email protected]/messages/send
Request Body
{
"threadId": "Hi kasunjith",
"payload": {
"mimeType": "message/rfc822",
"headers": [
{
"name": "To",
"value": "[email protected]"
},
{
"name": "From",
"value":"[email protected]"
},
{
"name":"Subject",
"value":"Subject Text"
}
]
}
}
I got response
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalidArgument",
"message": "Recipient address required"
}
],
"code": 400,
"message": "Recipient address required"
}
}