We have a sales team that uses gmail to send emails to their customers. We would like to be able to log those emails to our internal system and I wondered if there is anything in the gmail api that would allow for some script to be called when an email is sent? If so, is there any sample code for this functionality?
相关问题
- Token invalid - Invalid token: Cannot parse referr
- Getting error in Mail send Using Nodemailer
- How do I batch send a multipart html post with mul
- Gmail (for business) API doesn't allow to send
- Gmail Api Create Draft Reply
相关文章
- Insufficient Permission [403] error while modifyin
- failedPrecondition error when authenticating with
- Understanding Gmail api quotas
- iOS - Send an email automatically (NOT from user
- Error 400 when sending a message using python
- java.lang.NoSuchMethodError: No static method isAt
- How to extract full body content of a Bounced back
- GMAIL API sending email with attachment in c#
There are probably several ways to achieve this, but the steps I use myself are the following:
List the messages in the SENT-folder and ask for just the id with a maximum of 1 result (will give you the most recently sent):
Response:
Get the historyId that represents the point in time this mail was sent:
Response:
Look at the history at a certain interval, just looking at added messages under the SENT-label, and use the new historyId in your subsequent requests if there is one in the response:
Response: