How to send email through Gmail API ? Go

萝らか妹 提交于 2019-12-21 06:23:01

问题


I'm trying to send email through the gmail API using Go but I find the documentation quite flawed/ confusing. For once I don't see the receipt field nor the email body.

I don't need to upload anything so I find Simple upload, Multipart upload, Resumable upload methods totally useless. Is there any clear demo (with the data /params required e.g. a cURL payload) ?

As a side note I'm not sure if I'm the only one thinking this but the google apis seem quite the worst out there (in terms of usability) unless there is a library available. The Gmail API seems a good candidate.


回答1:


You could use directly the Go library for GMail API:
http://godoc.org/code.google.com/p/google-api-go-client/gmail/v1

(You have even simpler libraries like SlyMarbo/gmail or njern/gogmail)



来源:https://stackoverflow.com/questions/25363312/how-to-send-email-through-gmail-api-go

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!