Is there any way to schedule mail using gmail api?
The Gmail API has no scheduling functionality. You could solve it by temporarily holding the email on your own server as Jorden mentioned in the comments, or you could look into the App Engine Cron Service.
How to schedule an email at a specific date and time, with the gmail api?
I think that you are looking for a Queue/Worker/Jobs, Laravel implements it out of the box, you can check it here.
Remember that to process your queue you must have a second php artisan process running in your server to handle the queue, you could also use services like redis to process it.
Hope it helps you =)
Gmail now supports scheduling emails, how does is work using the gmail rest api, or is the api supporting this feature?
It says from this SO post that Gmail API has no scheduling functionality therefore as well as using Gmail REST API. You could probably Scheduling Tasks With Cron for Python that allows you to configure regularly scheduled tasks that operate at defined times or regular intervals.
As sender, using API or headers, is it possible to detect if an email was sent using Gmail's “Schedule Send”?
Issue:
By default you cannot detect that. The message headers don't include any information related to that, and the API's Message resource doesn't have any field which can clarify that.
Also, even though Scheduled
is a reserved system label and so labels cannot be created with that name:
Scheduled
is not a label which can be found in the API (e.g. by calling users.labels.list
), so you cannot filter messages (e.g. using users.messages.list
) according to whether they have this label.
Workaround:
- Create a custom label for schedule messages, and apply this label to these messages:
You can then list the messages that contain this label.
To do that, you should first retrieve the corresponding
labelId
, which you can fetch by first calling users.labels.list.And then call users.messages.list and add the previous
id
tolabelIds
, so that only messages with this label are returned:
File a Feature Request:
I'd suggest you to file a Feature Request in the corresponding Issue Tracker's component, so that scheduled messages can be programmatically listed through Gmail API.
Related Topics
Xcode 4.2 with Arc: Will My Code Run Even on iOS Devices with Firmware Older Than 5.0
How to Override Convenience Init in Uialertcontroller for Swift
How to Bind Multiple Observers to One Controlproperty
Core Data - Fetch All Entities Using the Same Field
Cocos2D Sprite Repeat Animation Forever
Can't Build an App for Distribution After Joining Existing Enterprise Developer Program
How to Lock Viewcontroller in Portrait Mode
iOS Lazy Var Uibarbuttonitem Target Issue
Determine The Maximum Number of Characters a UIlabel Can Take
Native-Like Momentum-Scrolling on Body in iOS Webapp
Use Elcimagepickercontroller to Pick Video
Nscoding Required Initializer in Inherited Classes in Swift