- Joined
- Oct 16, 2010
- Messages
- 17,555
- Reaction score
- 1,580
- Points
- 113
- Location
- Brentwood Bay, BC, Canada
- Your Mac's Specs
- 2011 27" iMac, 1TB(partitioned) SSD, 20GB, OS X 10.11.6 El Capitan
As the subject says, I can't get a SpamCop applescript that I've used successfully for years, right up to and including Mavericks 10.9.5 working properly with Mail.app in El Capitan.
The script is the "SpamCopNotify.scpt" that was created by a recommended scripter by SpamCop, and to be used with Apple Mail.
The problem is when used with El Capitan 10.11.6, the email gets sent but it doesn't include the normally enclosed attached "forward.emi" attachment that contains the required SPAM text and headers etc.
I'm sure no script expert and I can't see why it won't add the attachment file to the email using El Capitan but works fine using Mavericks.
I've included the script text below if any script guru would like to take a look and see if they can let me know what the problem might be.
Oh yes, I've also tried disabling El Capitan's SIP protection but it doesn't help, but it's all I could think of that might be goofing up the script from working properly.
The SpamCopNotify.scpt file's Script is: (My spamcop addess has been removed)
Any constructive help or information would be appreciated to get this script working with Mail.app in El Cap'n.
Thanks,
- Patrick
======
The script is the "SpamCopNotify.scpt" that was created by a recommended scripter by SpamCop, and to be used with Apple Mail.
The problem is when used with El Capitan 10.11.6, the email gets sent but it doesn't include the normally enclosed attached "forward.emi" attachment that contains the required SPAM text and headers etc.
I'm sure no script expert and I can't see why it won't add the attachment file to the email using El Capitan but works fine using Mavericks.
I've included the script text below if any script guru would like to take a look and see if they can let me know what the problem might be.
Oh yes, I've also tried disabling El Capitan's SIP protection but it doesn't help, but it's all I could think of that might be goofing up the script from working properly.
The SpamCopNotify.scpt file's Script is: (My spamcop addess has been removed)
set mySubmissionAddress to "submit.[MySpecialSpamCopAddressGoesHere]@spam.spamcop.net"
set sourceFile to ":tmp:forward.eml"
tell application "Mail"
set theMessages to the selection
repeat with thisMessage in theMessages
set thisSource to the source of thisMessage as string
set f to open for access sourceFile with write permission
set eof of f to 0
write thisSource to f
close access f
set newMessage to make new outgoing message at end of outgoing messages
set content of newMessage to ""
tell newMessage
set subject to thisMessage's subject
make new to recipient with properties {address:mySubmissionAddress}
tell content to make new attachment with properties {file name:sourceFile as alias} at after the last paragraph
end tell
set read status of thisMessage to true
set junk mail status of thisMessage to true
--set visible of newMessage to true
send newMessage
--display dialog sender of newMessage
delete thisMessage
end repeat
end tell
do shell script "rm -f '/tmp/forward.eml'"
Any constructive help or information would be appreciated to get this script working with Mail.app in El Cap'n.
Thanks,
- Patrick
======