how to send message using Gmail API with Ruby Google API Client?

后端 未结 2 1069
野的像风
野的像风 2020-12-10 19:32

i\'m facing several problem with API,

first:

send method asking for \'id\'(message id or thread id) .. but why ? i\'m sending new message so it shouldn\'t

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 20:22

    I think you may have a look at this gem I just built that use Gmail API and not using IMAP and SMTP like other gems:

    gem install gmail-api-ruby
    m = Gmail::Message.new(to: test@test.com, subject: "hello", html: "this is html part, text: "this is the text part")
    m.deliver
    

    gmail-api-ruby

    It comes with a lot of helpful methods that you use in Gmail interface

提交回复
热议问题