This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function forwardLabeledEmails() { | |
const labelName = ""; | |
const workerEndpoint = ""; | |
const authToken = ""; | |
const recipientEmail = ""; // Replace with your email address | |
// Get the date 24 hours ago | |
const now = new Date(); | |
const twentyFourHoursAgo = new Date(now.getTime() - 24 * 60 * 60 * 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function forwardLabeledEmails() { | |
const labels = ["label1", "label2", "label3"]; // Multiple labels | |
const workerEndpoint = ""; | |
const authToken = ""; | |
const recipientEmail = ""; // Replace with your email address | |
// Get the date 24 hours ago | |
const now = new Date(); | |
const twentyFourHoursAgo = new Date(now.getTime() - 24 * 60 * 60 * 1000); |
OlderNewer