简体   繁体   中英

GMail API get From: data out of message

I am trying to get the sender of an email in my inbox using the GMail API. I can not seem to find anything that will let me do this using the Users.messages.

The sender will be in message.payload.headers.From .

Description of payload.headers from the gmail api reference :

List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as To, From, and Subject.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM