- Registriert
- 01.03.07
- Beiträge
- 1.835
ich bin am verzweifeln. das script "sendMail" funktioniert alleine wunderbar, allerdings nicht mehr im zusammenhang mit der regel, die oben überprüft wird... das script bricht dann bei
"set newMessage to make new outgoing message with properties ... " (in sendMail)
ab.
sieht jemand den fehler?
"set newMessage to make new outgoing message with properties ... " (in sendMail)
ab.
sieht jemand den fehler?
Code:
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
set numberOfMessages to count theMessages
repeat with thisMessage in theMessages
set theSubject to subject of thisMessage
set theSender to sender of thisMessage
try
[hier werden ein paar anhänge verschoben und kopiert]
my sendMail(theSender, "erfolgreich", nameOfAttachment)
on error
my sendMail(theSender, "fehlgeschlagen", nameOfAttachment)
end try
end repeat
end tell
end perform mail action with messages
end using terms from
on sendMail(theSender, theStatus, theAttachment)
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:theStatus, content:"Datei: " & theAttachment}
tell newMessage
set visible to false
make new to recipient at end of to recipients with properties {address:theSender}
send
end tell
end tell
end sendMail