P
piyush
Hello,
I am writing a simple library in C# to display the name of the person
from the contact given the phone number (either business, home, mobile
etc). I also want
to then display any read and unread mails from that person.
I first go to contact and fetch the persons name depending on the
phone number supplied - say "Bill Gates".
I am facing these problems :
My current code uses Restrict (sFilter) where say
sFilter = "[SenderName] = 'Bill Gates'".
This works only if the SenderName is Bill Gates and not if say the
email comes
like Bill Gates (IT) or Bill Gates (HR).
The problem arises as people might use multiple emails and have
multiple display names like
"Bill Gates"
"Bill J. Gates"
"Gates, Bill"
"Gates, Bill (IT)"
While I can use multiple restricts for checking each condition, the
(IT) or (HR) conditions seem not solvable.
My question is whether we can use some variable strings in SenderName
like say I can check for opening and closing paranthesis in the
SenderName and use wild card characters to try to match only the first
parts :
sFilter = "[SenderName] = 'Bill Gates (??)' for handling cases like
Bill Gates (IT) and Bill Gates (HR) etc.
My second question is about performance. This piece of code would be
used in a large firm and hence Exchange server performance is very
critical.
I've heard using Restrict reduces the performance a lot - is there a
better way for finding mails from a particular person ?
Also, would using multiple restricts further decrease performance as
compared to just one restrict ?
Thanks in advance !
Piyush
I am writing a simple library in C# to display the name of the person
from the contact given the phone number (either business, home, mobile
etc). I also want
to then display any read and unread mails from that person.
I first go to contact and fetch the persons name depending on the
phone number supplied - say "Bill Gates".
I am facing these problems :
My current code uses Restrict (sFilter) where say
sFilter = "[SenderName] = 'Bill Gates'".
This works only if the SenderName is Bill Gates and not if say the
email comes
like Bill Gates (IT) or Bill Gates (HR).
The problem arises as people might use multiple emails and have
multiple display names like
"Bill Gates"
"Bill J. Gates"
"Gates, Bill"
"Gates, Bill (IT)"
While I can use multiple restricts for checking each condition, the
(IT) or (HR) conditions seem not solvable.
My question is whether we can use some variable strings in SenderName
like say I can check for opening and closing paranthesis in the
SenderName and use wild card characters to try to match only the first
parts :
sFilter = "[SenderName] = 'Bill Gates (??)' for handling cases like
Bill Gates (IT) and Bill Gates (HR) etc.
My second question is about performance. This piece of code would be
used in a large firm and hence Exchange server performance is very
critical.
I've heard using Restrict reduces the performance a lot - is there a
better way for finding mails from a particular person ?
Also, would using multiple restricts further decrease performance as
compared to just one restrict ?
Thanks in advance !
Piyush