googleapis / google-api-nodejs-client

Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
https://googleapis.dev/nodejs/googleapis/latest/
Apache License 2.0
11.45k stars 1.92k forks source link

Does the Gmail API library (gmail_v1) from Google APIs take time to send emails? #3575

Open PatricioPoncini opened 1 month ago

PatricioPoncini commented 1 month ago

I'm using this library in Node.js and just made four requests in quick succession, all to the same email address and with the same body. To my surprise, only the first one arrived. Why is this happening? Is this how the library works? I would like to know more, as I understand that if this endpoint were used frequently in my application, there could be emails that wouldn't be generated

This is the body of my request; as you can see, it is very simple:

{
  "subject": "Example subject",
  "to": ["test@test.com"],
  "body": "<h1>Hello, World!</h1><p>This is an email body in HTML format.</p>"
}
PatricioPoncini commented 1 month ago

I think I understand. If I send the same body to the same email address, the second email won't be sent, right? Since the previous one sent is exactly the same. Can you confirm this?