get detail email info Gmail API - gmail

I can able to get the list of unread emails via [https://mail.google.com/mail/feed/atom/] using the Gmail API.
but using that , I can only get a brief info of an email message like ( to, from, subject and summary ).
If I want to get CC, BCC, and attachment info , how can I get using the Gmail API ?

I can't find a way to get that functionality with GMAIL API. So I use IMAP to authenticate with Oauth Token and use IMAP instead.

Related

Mails sent via smtp.gmail.com or Google Client API and DKIM

I'm currently experimenting with Google Email Markup sent via PHP. I'm letting users authenticate using Google_Service_Oauth2 and then send a mail from their mail account to themselves using Google_Service_Gmail and users_messages->send('me', $encodedMessage).
The markup itself checks out valid in the Email Markup Tester. And HotelReservation and FlightReservation types even show up fine in Inbox. But all other types don't show up as cards.
After poking around I found a few comments that this might be because of a missing DKIM signature in those mails. And yes, when I send the exact same HTML (I'm using Microdata markup.) using the Gmail Actions Tester, the mails have DKIM signatures and the cards appear as expected.
This is, although the Markup documentation clearly states:
All emails where the sender and the recipient are the same account ignore the registration requirements and can be used for self-testing.
And I didn't want to setup some mail proxy in Google Apps Engine just to get that DKIM signature.
So how can I send mails to myself using smtp.gmail.com or the Google Client API and get a DKIM signature added by GMail?

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?
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.

how can i send a json+ld schema.org email to myself in gmail

gmail recently announced schema.org support for in-app and one-click actions. They note that one can immediately test out the schema by sending an email from oneself to oneself i.e. from x#gmail.com to x#gmail.com (1)
My question is how do i send an email with the json+ld schema.org markup - I can only send text and/or html and if i try to send using mailgun / sendgrid etc. than the email won't be from x#gmail.com
So, how do i test this??
(1) https://developers.google.com/gmail/schemas/registering-with-google
Many options, three that come into my mind right now are:
use the Apps Script Gmail service, as shown in our Apps Script quickstart guide
use App Engine as in the end-to-end example in the documentation
connect to Gmail via SMTP to send emails from there

How to launch a gmail client with a specific email

I have a browser application that retrieves gmail items in inbox using IMAP. I have the 'seqno' and the Message-ID of the email, and can fetch the content. I've created and rendered HTML with that email as a link. What I would like to do is to launch another browser with that email displayed in gmail client.
I noticed that there is no correlation between Gmail's URLs and the Message-ID or 'seqno'. How do I translate my ID into a URL that would launch the right email?
thanks.
I'm not sure you can. However check Gmail's IMAP Extensions, specifically, see if X-GM-MSGID correlates at all with the URLs.

Retrieving emails from gmail

I've been using Oauth for G-mail to get the emails, it's going perfectly until I faced a problem that after following the Goggle playground for Oauth
the last response contained the emails as I want except than that I want the Full content of the email, not only the summery ...
what I'm missing ...?
The example flow there is for using an unread messages feed with an aggregator/RSS-reader software. Google has decided to only include the summary and a URL to view the message on the Gmail website there.
If you want download the message contents you have to fetch them using IMAP. Google also supports IMAP using OAuth authentication.

Resources