Forenindex » Programmierung/Entwicklung » AppleScript » 'Fwd: ' vom Email Header entfernen

'Fwd: ' vom Email Header entfernen

TBfromGL
Beiträge gesamt: 1

28. Aug 2023, 11:00
Bewertung:

gelesen: 27336

Beitrag als Lesezeichen
Alles funktioniert eigentlich gut, das 'Fwd:' schmerzt in meinen Augen

Code
tell application "Mail" 
set theMessage to item 1 of (get selection)
set forwardedMessage to forward theMessage without opening window
tell forwardedMessage
make new to recipient at end of to recipients with properties {address:"a@b.com"}
set message signature of forwardedMessage to signature "Blank" of application "Mail"
set stringLength to (count subject of forwardedMessage)
set subject of forwardedMessage to (characters 0 thru stringLength) as string
send
end tell
end tell