Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send email to people via Google Plus API?

According to Google Plus, you can e-mail Google Plus users within your circle: refer this

  • How can you use the Google Plus API (or Gmail API) to send an e-mail to a user within your circle, given you have their user ID?
  • If you cannot do this, how can you send them a message via hangouts?
like image 254
William Bing Hua Avatar asked May 08 '15 00:05

William Bing Hua


People also ask

Is Google email API free?

Gmail API is available for free, but it has certain daily usage limits for API calls. Daily usage: 1 billion API calls per day. Per User Rate Limit: 250 API calls per user per second.

How many emails can you send with Gmail API?

1,000,000,000 quota units per day for your application. 250 quota units per user per second, moving average (allows short bursts).

How do you send an email on behalf of someone on Google?

Send a message on behalf of someone else Before you send a message on behalf of another person, you must add their email address to the From field. Once you've entered the person's address, it shows automatically when you compose new messages. Recipients have that person's address in the message's From field.


1 Answers

You should follow the official Gmail API reference guide here.

From the docs:

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.

The arguments you'll need to provide in order to send an email through the API are the following:

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.
like image 72
LS_ Avatar answered Oct 12 '22 12:10

LS_