Set "to" not "sender" in Outlook express
Set "to" not "sender" in Outlook express
- Subject: Set "to" not "sender" in Outlook express
- From: Pamela Takeshige <email@hidden>
- Date: Tue, 26 Feb 2002 08:19:21 +0900
Sorry, this is a newbie question.
I am using a script I got from a book and I am trying to modify it. It now
copies the sent items box of Outlook Express into a FileMaker Pro database
that I have. It does it well. But I want to change the settings so that it
copies the email address of the person I sent it to, not my address, which
it does now. I don't need to keep a record of my address, I would rather
keep the email address of the person I sent it to.
I have looked at the dictionary of the Outlook Express to find the command
for doing that. I tried "recipient", but I keep getting an error saying that
I can not use it. There is a command "sender" but there does not seem to be
a command for "To"....?? Can anyone give me a hint where to go with this.
the wole script is at the bottom, but the bit that needs changing is:
__________________________
on processMail(myMessage)
tell application "Outlook Express"
move myMessage to folder "Read Mail"
_____ set mySender to sender of myMessage_________
set mySenderAddress to address of mySender
set mySenderName to display name of mySender
set mySubject to subject of myMessage
set myContent to content of myMessage
set myTimeSent to time sent of myMessage
end tell
____________________________________________
Regards,
Pam
The whole script for those who are interested:
global myKeywordMatches
on run
set myKeywords to {""}
set mySearchType to "or"
set myIncludeSubject to true
set myIncludeBody to true
tell application "Outlook Express"
set myMessages to every message in folder "Sent Items"
repeat with myMessage in myMessages
set myText to ""
set myKeywordMatches to ""
if myIncludeBody then set myText to myText & the content of
myMessage & return
if myIncludeSubject then set myText to myText & the subject of
myMessage
set myFound to false
considering case
repeat with myKeyword in myKeywords
if myText contains myKeyword then
set myFound to true
set myKeywordMatches to myKeywordMatches & myKeyword
& " "
if mySearchType = "or" then exit repeat
else
if mySearchType = "and" and myKeyword ュ last item of
myKeywords then
set myFound to false
exit repeat
end if
end if
end repeat
end considering
if myFound then
my processMail(myMessage)
end if
end repeat
end tell
end run
on processMail(myMessage)
tell application "Outlook Express"
move myMessage to folder "Read Mail"
set mySender to sender of myMessage
set mySenderAddress to address of mySender
set mySenderName to display name of mySender
set mySubject to subject of myMessage
set myContent to content of myMessage
set myTimeSent to time sent of myMessage
end tell
tell application "FileMaker Pro"
tell database "Outgoing Mail"
set myNewRecord to (create new record)
set cell "sender name" of myNewRecord to mySenderName
set cell "sender address" of myNewRecord to mySenderAddress
set cell "subject" of myNewRecord to mySubject
set cell "content" of myNewRecord to myContent
set cell "time sent" of myNewRecord to myTimeSent as text
end tell
end tell
end processMail
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.