Bonjour,
J'aimerai rajouter les expéditeurs des mail que je reçois dans le carnet d'adresse. Je veux faire ça avec une règle Mail. J'appelle donc dans la règle le script suivant :
Quand la règle passe, il ne se passe rien...
Y a-t-il un fichier de log quelque part ?
Une idée ??
Merci d'avance
J'aimerai rajouter les expéditeurs des mail que je reçois dans le carnet d'adresse. Je veux faire ça avec une règle Mail. J'appelle donc dans la règle le script suivant :
Bloc de code:
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with eachMessage in theMessages
set theSender to sender of eachMessage
set theSenderAddress to address of theSender
set theSenderName to theSenderAddress
set theGroupName to "Add_Auto"
add2AddresseBook(theSenderName, theSenderAddress,
theGroupName)
end repeat
end tell
end perform mail action with messages
end using terms from
on add2AddresseBook(theName, theAddress, theGroup)
tell application "Address Book"
set theGroup to group theGroupName
set theNewPerson to make new person at end of people
set first name of theNewPerson to theName
tell theNewPerson to make new email at end of emails with properties {label:"home", value:theSenderAddress}
add theNewPerson to theGroup
end tell
end add2AddresseBook
Quand la règle passe, il ne se passe rien...
Y a-t-il un fichier de log quelque part ?
Une idée ??
Merci d'avance