Sending an email with ruby gmail api v0.9
问题 Does anyone have a simple example as to how to send an email from scratch with the v0.9 API. simply want an example of sending the following: m = Mail.new( to: "test1@test.com", from: "test2@test.com", subject: "Test Subject", body:"Test Body") Now to create that message object which is required to send,we can use: msg = Base64.urlsafe_encode64 m.to_s And then try to send (where message_object = msg): client = Google::Apis::GmailV1::GmailService.new #Appropriately authorised client.send_user