I wish to send an email with an attachment through gmail.
I'm using google-api-nodejs-client for node.js.
My current message sending code is:
var gmailClass = google.gmail('v1');
gmailClass.users.messages.send({
auth: OAuth2Client,
userId: 'me',
resource: {
raw: base64EncodedEmail
},
}
,function(err, results)
{
if (!err)
{
//do something
}
else
{
//do something
}
});
Is there a way to add an attachment to the send function?