on «event MManCRML» given «class SUBJ»:subj, «class BODY»:body, «class RECP»:rcpt -- 'rcpt' is a list of recipients. Theoretically this list -- could have any number of items, but in practice -- there's almost always exactly one recipient, so -- for simplicity we just use the first item of the list. -- Each list item is a record with two members, -- RCAD (address) and RCNM (name). -- -- The RCNM member may be missing, so we must use -- a try block when accessing it. set addr to «class RCAD» of item 1 of rcpt try set realname to «class RCNM» of item 1 of rcpt on error set realname to "" end try tell application "Mail" -- auskommentieren wenn man keine Citation-Line möchte set ext_body to realname & " <" & addr & "> " & "wrote:" & return & return & body -- ext_body durch body ersetzen wenn man keine Citation-Line will set msg to make new outgoing message with properties ¬ {subject:subj, content:ext_body} tell msg set visible to true -- hier eigenen Absender eintragen. Muss in Mail als Account oder -- zusätzliche Mail-Adresse existieren set sender to "Florian Munz " make new to recipient at end of to recipients with properties ¬ {name:realname, address:addr} end tell activate end tell end «event MManCRML»