Edit script to "Forward Spam to ISP"?

  • Thread starter Norman R. Nager, Ph.D.
  • Start date
N

Norman R. Nager, Ph.D.

1. How does one edit the script "Forward Spam to ISP" to change the email
address to which it is forwarded? (The script prompted me the first time I
used it to enter an email address for the ISP. But it no longer prompts and
just inserts the same address, which I now need to change.)

2. How does one edit "Forward Spam to ISP" so that it deletes the original
spam message after the script forwards a copy to the ISP?

The following is the script as it now exists:

property spamDumpBox : ""
property sendNow : true

if spamDumpBox = "" then -- first time only
display dialog "Enter the email address of your ISP's SPAM mailbox, to
which spam mail should be forwarded:" default answer "" with icon 1
set spamDumpBox to text returned of result
display dialog "Send all spam forwards as soon as as they are ready, or
leave them in the Outbox until the next Send & Receive All schedule?"
buttons {"Cancel", "Leave in Outbox", "Send Them"} default button 3 with
icon 1
if button returned of result = "Cancel" then -- if non-English must
specify
return
else if button returned of result = "Leave in Outbox" then
set sendNow to false
else
set sendNow to true
end if
end if


tell application "Microsoft Entourage"
try
set theMsgs to (current messages)
on error
beep
display dialog "You must first select a message in the message
pane."
return
end try
repeat with theMsg in theMsgs
my ProcessMessages(theMsg)
end repeat
if sendNow then send -- just one connection to send all
end tell

to ProcessMessages(theMsg)

tell application "Microsoft Entourage"
set {origSubject, origHeaders} to theMsg's {subject, headers}
set fwdMsg to forward theMsg to spamDumpBox without opening window
set fwdContent to content of fwdMsg
set content of fwdMsg to (origSubject & return & return &
origHeaders & return & return & fwdContent)
send fwdMsg with sending later -- puts in outbox
end tell

end ProcessMessages
 
B

Barry N. Wainwright

1. How does one edit the script "Forward Spam to ISP" to change the email
address to which it is forwarded? (The script prompted me the first time I
used it to enter an email address for the ISP. But it no longer prompts and
just inserts the same address, which I now need to change.)

Open the script, add one space, delete that space and re-save the script.
You will be asked for the preferences next time round.
2. How does one edit "Forward Spam to ISP" so that it deletes the original
spam message after the script forwards a copy to the ISP?

See where I have added two lines (actually, one line, repeated) down
below...
The following is the script as it now exists:

property spamDumpBox : ""
property sendNow : true

if spamDumpBox = "" then -- first time only
display dialog "Enter the email address of your ISP's SPAM mailbox, to
which spam mail should be forwarded:" default answer "" with icon 1
set spamDumpBox to text returned of result
display dialog "Send all spam forwards as soon as as they are ready, or
leave them in the Outbox until the next Send & Receive All schedule?"
buttons {"Cancel", "Leave in Outbox", "Send Them"} default button 3 with
icon 1
if button returned of result = "Cancel" then -- if non-English must
specify
return
else if button returned of result = "Leave in Outbox" then
set sendNow to false
else
set sendNow to true
end if
end if


tell application "Microsoft Entourage"
try
set theMsgs to (current messages)
on error
beep
display dialog "You must first select a message in the message
pane."
return
end try
repeat with theMsg in theMsgs
my ProcessMessages(theMsg)
end repeat
if sendNow then send -- just one connection to send all
end tell

to ProcessMessages(theMsg)

tell application "Microsoft Entourage"
set {origSubject, origHeaders} to theMsg's {subject, headers}
set fwdMsg to forward theMsg to spamDumpBox without opening window
set fwdContent to content of fwdMsg
set content of fwdMsg to (origSubject & return & return &
origHeaders & return & return & fwdContent)
send fwdMsg with sending later -- puts in outbox

-- Add these two lines here --
Delete theMsg
Delete theMsg
-- End of Added Lines --
end tell

end ProcessMessages

--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the Entourage FAQ pages? - Check them out:
<http://www.entourage.mvps.org/toc.html>

Please post responses to this newsgroup. If I ask you to contact me
off-list, remove '.INVALID' from email address before replying.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top