I\'m trying to create drafts in Gmail using the .Net Client Library. I can successfully login and retrieve a list of drafts so the authentication and api are working. Now I
message > raw
is expected to be the full SMTP message.
{
"message": {
"raw": "From: me@example.com\nTo:you@example.com\nSubject:Ignore\n\nTest message\n"
}
Alternatively, you can also set the appropriate fields in message > payload
:
{
"message": {
"payload": {
"headers": {
{"name": "From", "value": "me@example.com},
{"name": "To", "value": "you@example.com"},
{"name": "Subject", "value":"Ignore"}
},
"body": {
"data": "Test message"
}
}
}
}