Moderators: Eric, Tomas, robin
Unfortunately it won't do it automatically.Brian_E wrote:Is it possible to get PocoMail to automatically delete e-mails that are older than a specified age?
Seems to work here just fine.Brian_E wrote:Unfortunately, the script doesn't want to work for me either. I selected some messages and set the period to one day, but nothing happened when I ran it.
{### Archive Old Mail
{ Script will archive any selected messages older
{ than a specified number of days to a specified folder
{ Usage: best used on Selected messages
{ To try it out, select some messages, setup this script
{ in Scripts/Setup, then run it in Scripts/Settings by
{ selecting it along the bottom and clicking on Now button
{ Initialize user settings: }
External $userdata1 "Archive messages older than: (days)" "30"
External $userdata2 "Which mailbox should I archive them to:%mailboxes%" "Archives"
{ Make sure message is appended to mailbox }
AppendToFile True
{ Get today's date }
GetDate $todaydate
{ Get message's date }
ReadHeader $messagedate "Date:" %message
{ Calculate the message age }
SubDays #diff $todaydate $messagedate
{ Compare the age to user setting }
if #diff > $userdata1 then PerformCopy
{ Exit if the difference is not greater }
Exit
{ If true, jump here and archive the message }
:PerformCopy
{ Load the mailbox filepath information }
AddStrings $UserData2 ".mbx"
SaveMessage %message $UserData2
{ Finally, deleting the original message }
DeleteMessage %message
Return to PocoMail Help and How-To
Users browsing this forum: No registered users and 4 guests