如何通过 Google Plus API 向他人发送电子邮件?
How to send email to people via Google Plus API?
根据GooglePlus,您可以向Google您圈子内的Plus用户发送电子邮件:refer this
- 如何使用 Google Plus API(或 Gmail API)向您圈子内的用户发送电子邮件,前提是您有他们的用户 ID?
- 如果您不能这样做,您如何通过环聊向他们发送消息?
您应该遵循官方 Gmail API 参考指南 here。
来自文档:
There are two ways to send email using the Gmail API:
You can send it directly using the messages.send method.
You can send it from a draft, using the drafts.send method.
Emails are sent as
base64url encoded strings within the raw
property of a message
resource. The high-level workflow to send an email is to:
Create the email content in some convenient way and encode it as a
base64url string. Create a new message resource and set its raw
property to the base64url string you just created. Call messages.send
,
or, if sending a draft, drafts.send
to send the message.
要通过 API 发送电子邮件,您需要提供以下参数:
Args:
- service: Authorized Gmail API service instance.
- user_id: User's email address. The special value "me"
can be used to indicate the authenticated user.
- message: Message to be sent.
根据GooglePlus,您可以向Google您圈子内的Plus用户发送电子邮件:refer this
- 如何使用 Google Plus API(或 Gmail API)向您圈子内的用户发送电子邮件,前提是您有他们的用户 ID?
- 如果您不能这样做,您如何通过环聊向他们发送消息?
您应该遵循官方 Gmail API 参考指南 here。
来自文档:
There are two ways to send email using the Gmail API:
You can send it directly using the messages.send method.
You can send it from a draft, using the drafts.send method.
Emails are sent as base64url encoded strings within the
raw
property of a message resource. The high-level workflow to send an email is to:Create the email content in some convenient way and encode it as a base64url string. Create a new message resource and set its raw property to the base64url string you just created. Call
messages.send
, or, if sending a draft,drafts.send
to send the message.
要通过 API 发送电子邮件,您需要提供以下参数:
Args:
- service: Authorized Gmail API service instance.
- user_id: User's email address. The special value "me"
can be used to indicate the authenticated user.
- message: Message to be sent.