Quiero crear un script de Apple que reenviará un correo electrónico marcado a [email protected]
He intentado este script:
on run
tell application "Mail"
repeat with _acct in imap accounts
--Look For Flagged Messages in the INBOX
set _acct_name to name of _acct
set _inbox to _acct's mailbox "INBOX"
set _msgs_to_capture to (a reference to ¬
(every message of _inbox ¬
whose flagged status is true))
repeat with eachMessage in _msgs_to_capture
set theStart to missing value
set theDue to missing value
set theOmniTask to missing value
set theTitle to the subject of eachMessage
set theNotes to the content of eachMessage
set theCombinedBody to "message://%3c" & message id of eachMessage & "%3e" & return & return & theNotes
tell application "OmniFocus"
tell default document
set newTaskProps to {name:theTitle}
if theStart is not missing value then set newTaskProps to newTaskProps & {start date:theStart}
if theDue is not missing value then set newTaskProps to newTaskProps & {due date:theDue}
if theCombinedBody is not missing value then set newTaskProps to newTaskProps & {note:theCombinedBody}
set newTask to make new inbox task with properties newTaskProps
end tell
end tell
set flagged status of eachMessage to false
end repeat
end repeat
end tell
end run
Sin embargo, este script abre OmniFocus en lugar de solo enviar un correo electrónico.
¿Cómo cambiaría este script o comenzaría con uno nuevo para que reenvíe automáticamente un correo electrónico marcado a [email protected]?
email
applescript
script
Chris
fuente
fuente
Respuestas:
Aquí hay un código, sin referencias a su aplicación OmniFocus, que reenvía todos los mensajes marcados a una dirección establecida. Ajústate a tu gusto ...
Funciona de maravilla en mi MacBook Snow Leopard.
fuente