| .0� I have also read that V3.0 of ALL-IN-1 has some sort of rule
.0� based mail filtering based on the mail header attributes. Sounds
.0� like this could be what I'm looking for. Any comments?
That sounds like the ALL-IN-1 Personal Assistant. This is for
ALL-IN-1 V2.4 (not V3.0) only at the present time..... and that can
certainly answer your needs.
What I use is the following UDP. It doesn't quite answer the exact
question posed, but it could be modified to provide your needs as well
as mine...
If you enter your name at the prompt, it will show if the current
message is TO: or CC: you. You can also use it to see how many people
have received the message (press RETURN); or who else at your site has
received the message (enter the location code); or else if Joe has
received the message (enter JOE).
To use it, go WP UD C to create a UDP, and then GOLD GET this note,
and remove the drivel at the top here....
I call my version of this UDP EM_WHO.
!EM_WHO
.if oa$scroll_key nes "" then cab current oa$scroll_key
.fx prompt "Enter Name or location to search for: "
.if oa$prompt_dispose eqs 0 then .goto end
!.if oa$prompt_text eqs "" then .goto end
.fx decimal I
.fx get #found = 0
.fx for cab$attributes:"TO" with .value <=> oa$prompt_text do -
get "TO: " .value \\ compute #found = #found + 1
.fx for cab$attributes:"CC" with .value <=> oa$prompt_text do -
get "CC: " .value \\ compute #found = #found + 1
.fx get #att = 0
.fx for cab$attach do -
compute #att = #att + 1 \\ -
for cab$attach_attributes:"TO" with .value <=> oa$prompt_text do -
get "Att." #ATT ": TO: " .value \\\\ compute #found = #found + 1
.fx get #att = 0
.fx for cab$attach do -
compute #att = #att + 1 \\ -
for cab$attach_attributes:"CC" with .value <=> oa$prompt_text do -
get "Att." #ATT ": CC: " .value \\\\ compute #found = #found + 1
.if #found eq 1 then .goto just_one
.if #found = 0 then .goto none
.fx get #found " matches found. Press GOLD W for list"
.label end
.fx oa$fld_stay
.exit
.label just_one
.exit
.label none
.fx get "No matches found for " oa$prompt_text
.exit
!
! The above UDP prompts for a string and searches the TO/CC list of
! the current message and all of its attachments for that string.
! I use it to find out if a message has been sent to anyone else
! in this location (search for BST etc), or to a certain user
! (enter their name)
!
! If it finds just one match, it shows the match.
! If it finds more than one match, it shows how many match, and asks
! you to press GOLD W.
! It shows whether the message has been sent as a TO or as a CC, and
! which attachment the addressee is on.
!
|
| I would certainly think that you might benefit from some of the existing
mail filtering applications, or perhaps the Personal Assistant. However, just
to address the specific issue, here's a *very* crude form of something you
might want to try. All this does is to use a flag (#WHICH), that can be set
either to "TO" or "CC" (default = "TO"). It then looks through the INBOX for
anything with your user name in that field, and displays the document key
(i.e., folder and docnum).
By itself, it's pretty simple. So what you'd want to do is work it into
a more complex application, perhaps with an index form, etc.
HTH
F
================================================================================
get #name = "( " oa$user " )"
.if #which eqs "" then get #which = "TO"
for cab$ with .folder eqs "INBOX" do -
get #key = .%key\\ -
cab current #key\\ -
for cab$attributes with (.key eqs #which) and (.value <=> #name) do -
get oa$display = #key
|
|
Thanks for the hints in .1 and .2
I have written a UDP (see below) which will select all messages
TO: you from those displayed on the current index form. Please
feel free to copy this if you find it useful or to suggest
alternative ways of doing it.
Cheers,
Kerry.
------------------------------------- TOP --------------------------------------
!
! TO.UDP
! ======
!
! This UDP SELECTS all messages in the current index which are specifically
! TO: the user. The match is performed on surname only to ensure that all
! possible messages are selected. This may result in some messages TO: a
! person with the same surname being selected but better safe than sorry.
!
! firstly, deselect all messages
.fx GET OA$FUNCTION="FOR " OA$SCROLL_BINDING " DO -
OA$SCL_deSELECT OA$SEL_ADDRESS
.fx decimal I
! now, for each message in the index check whether the user is on the TO: list
.label scan_index
!================
.if oa$scroll_key nes "" then cab current oa$scroll_key
.fx get #fto = 0
.fx for cab$attributes:"TO" with .value <=> OA$PROFIL_SURNAME1 do -
compute #fto = #fto + 1
.if #fto eq 0 then .goto next_msg
.fx OA$SCL_SELECT OA$SCROLL_ADDRESS
.fx oa$scl_down
.if oa$msg_id eqs "SCLATBOTTOM" then .goto finish_up
.goto scan_index
.label next_msg
!==============
.fx oa$scl_down
.if oa$msg_id eqs "SCLATBOTTOM" then .goto finish_up
.goto scan_index
.label finish_up
!===============
.fx oa$scl_first_page
.fx OA$SCL_REFRESH
.fx get "All messages TO: you have been selected"
.exit
|