Script to detach eMail attachments not working (12.4)
Script to detach eMail attachments not working (12.4)
- Subject: Script to detach eMail attachments not working (12.4)
- From: "Hellum, Timothy via AppleScript-Users" <email@hidden>
- Date: Tue, 28 Jun 2022 11:49:20 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=globeandmail.com; dmarc=pass action=none header.from=globeandmail.com; dkim=pass header.d=globeandmail.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=g8Zv2KrbdIITNGmcntBLPyRekAmyio4k5jaXxiqqs5Q=; b=c+0V8i3bpqyxqA0baagQEn1RwRCrLk1unTLKnBdpnNs/SDyLvBj5PWTrZnxYJxy6/4qMY7aZGCRDYP6GYdYmn/WbOkXNNv62cAhxF2GjPAvBrpCqPfN5j6CdMSo2mdfrB4mGcWgmD/y1ktU0K0LSRZbBUXajQkDMOmonIRaHHJ13lbz+6WEKZ/ND7bvEqMMFx1skX7thl9SMWMVVYxixyVYVX1QfswXH1IOzdsBwa1QPiJ6D+Xpym0gqUJ6ILcdJOOSGUD3ZxCeSa9vxX8EbQy8OUu5/tDFut8NQtUNSYmyjTTaiisWGqssPKMub0jGg4f9crWcBhTpD8+eNmDZF8w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PAoEGnJ+HV96SL7IUypoRgVGPueps2N0hAELB/MI8twAMMoRH786yxik1sjCs1PDhuEXvvbv0NGskWWQmLsgpOWDjNHuRKP/fMO88+nEeyf+STJDM0F+vuuqryXK07TtuL4pFZElUU0sfrWvf1/kkREZvp2bi8/H+00rUOQOF0nBf+JUbGQmMmm0G5y/EoI0200gINxiXjHnnRPQblmJeIzpmbojLeoHGhoce6lK283HSI7YY9HTsTUBg7xH9bfJWhzXDA1K0KzCyOOvKM/WIn4uK5kGJ+aGsSXvvxKH9YvImJIeHLcDy+vLMOtQtlQ9BC5QszpkImpYBjIA3xEl+Q==
- Thread-topic: Script to detach eMail attachments not working (12.4)
Good morning List,
I recently had to nuke/pave a machine that had a functioning Applescript I used
to detach attachments in Apple Mail. It hinged on the To: field to match the
address and then detached files and put them in a subfolder of ~/Documents.
However, on rebuild of the machine, this script no longer detaches files
although manually running it from right-click-Apply-Rules has the gear icon
appear in the menubar for a second or two suggesting the script is running. The
rebuild of the system was back to 12.4, the same as previous. I am wondering if
the script kept working under the previous build because of progressive
upgrades to the system from Mojave and was ‘grandfathered’ by the system, as
opposed to the new and current build of 12.4 from nuked?
I have allowed Apple Mail Accessibility and Full Disk Access in Privacy of
System Preferences.
At any rate, the script that should be working is as follows. Does anyone see
why this script might be running, but not detaching?
Any ideas much appreciated.
#Evaluate 1 minute's worth:
set saveLocus to (path to documents folder as text) & "ChartsIn:"
tell application "Mail"
set arbitraryTargetsbydate to inbox's messages whose date received comes after
(((current date)) - 1 * minutes)
repeat with aMessage in arbitraryTargetsbydate
set theAttachments to aMessage's mail attachments
if theAttachments ≠ {} then
repeat with anAttachment in theAttachments
set itsName to name of anAttachment
save anAttachment in file (saveLocus & itsName)
end repeat
end if
end repeat
end tell
Kind regards,
/timothy
[signature_580249049]
Timothy Hellum | Application Specialist, IT
c: 647.222.5168 | e: email@hidden<mailto:email@hidden>
351 King Street East, Toronto, ON M5A 0N1
http://www.globeandmail.com<http://www.globeandmail.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden