搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

message filter time

  • 4 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 LemonCat

more options

I need a message filter that moves messages based on the time of day it was received. It needs to ignore the calendar date. Example: Message 9/5/16 08:14 > Period_1_Folder Message 9/5/16 08:15 > Period_2_Folder Message 9/6/16 08:14 > Period_1_Folder Message 9/6/16 08:15 > Period_2_Folder

I am a teacher who receives over 150 student emails a day, several times each week. Filtering by email address is impractical, as students are added and dropped from my class every few weeks.

I've tried View-Source to look for a special Time tag, but can only find date, which is not what i need.

I need a message filter that moves messages based on the time of day it was received. It needs to ignore the calendar date. Example: Message 9/5/16 08:14 > Period_1_Folder Message 9/5/16 08:15 > Period_2_Folder Message 9/6/16 08:14 > Period_1_Folder Message 9/6/16 08:15 > Period_2_Folder I am a teacher who receives over 150 student emails a day, several times each week. Filtering by email address is impractical, as students are added and dropped from my class every few weeks. I've tried View-Source to look for a special Time tag, but can only find date, which is not what i need.

所有回覆 (4)

more options

Can you write javascript? You probably need a more precise filtering action than is offered by the native filtering system.

more options

Yes, I can write Javascript, or rather I can edit an existing, similar script, fairly well.

more options

OK, the FiltaQuilla add-on lets you launch a javascript as its filtering action. You have a good chance of being able to do the date/time parsing in the javascript.

(I am way out of my depth already. :-( )

https://addons.mozilla.org/en-US/thunderbird/addon/filtaquilla/

more options

So, this is my draft pseudo-code for it. :/


// Define time string arrays Def Int varTime1 = ["08:22", "08:23", .. "09:14", "09:15"] . . Def Int varTime7 = ["13:56", "13:57", .. "14:46", "14:47"]

//check the email format for key parts of student emails if message(Reply-To).contains ("21_" OR "22_" OR "23_") AND ("@domain.net") then

//for each time string in the array ForEach varTime1 do //check if the date string in the email message header contains it if message(DateStr).contains varTime1 then //and if it does, move it to a specific folder Message.MoveTo(Inbox\StudentWork\Period1) End . . ForEach varTime7 do if message(DateStr).contains varTime7 then Message.MoveTo(Inbox\StudentWork\Period7) End

//if the email format matches a student email, but is out of hours, move the email message to a specific folder Message.MoveTo(Inbox\StudentWork)

//if the email format does not match a student email, do nothing end