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
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