0
因此,这里是我的代码(几乎)看起来像使用谷歌的API-红宝石客户端创建一个消息:回复主题谷歌的API-红宝石客户
service ||= Google::Apis::GmailV1::GmailService.new
message = RMail::Message.new
message.header['To'] = params[:gmail][:to]
message.header['From'] = current_user_google_user_id
message.header['Subject'] = params[:gmail][:subject]
message.header['Subject'] = params[:gmail][:subject]
message.body = params[:gmail][:body]
service.send_user_message(
current_user_google_user_id,
upload_source: StringIO.new(message.to_s),
content_type: 'message/rfc822',
thread_id: params[:gmail][:thread_id]
)
这显然是失败的原因的我有thread_id
。如果我删除该行,事情工作正常,但我不能把东西的范围保留到一个线程。我应该如何将线程ID传递给GmailService?
我从此改变了一个不同的宝石,但实际上,这就是我想通了。 – thatmiddleway
如何回复但使用Mail:Message对象?我无法在我的Mail:Message对象中添加thread_id参数 –