Created
August 17, 2014 03:30
-
-
Save AkashMartin1/20ab002e7f5785ae778e to your computer and use it in GitHub Desktop.
Gmail API Send message : ArgumentError: no method name given
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@email = @google_api_client.execute( | |
api_method: @gmail.users.messages.send, | |
parameters: { | |
userId: 'me', | |
message: { | |
raw: { | |
payload: { | |
body: { date: 'aGVsbG8=' }, | |
headers: [{ name: 'to', | |
value: 'akash@gmail.com'}, | |
{ name: 'from', | |
value: 'akash@gmail.com'}, | |
{ name: 'subject', | |
value: 'Hi'}], | |
mimeType: 'text/plain' | |
} | |
} | |
} | |
}, | |
headers: {'Content-Type' => 'application/json'} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am facing the same problem. Could you please post a sample working code?