Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recipients address not always valid
Message
From
24/04/2003 12:46:32
 
 
To
24/04/2003 07:04:49
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00780998
Message ID:
00781189
Views:
16
>You really should check out the November 2002 issue of FoxTalk magazine. Whil has an article in that issue called "Look Out! It's Outlook" that does exactly the thing you are trying to do here.
>
>The article discusses all the anomolies you are running into and workarounds for them.

Thanks, I checked that article. It is basically the same approach.

However, I am using a more complex version of it:
* Sender email
lcAddress=''
IF '@'$Sender
   lcAddress=Sender
   ELSE
   loReply=loItem.Reply()
   llOk=.F.

   * First, lets try to get it from this method
   IF TYPE('loReply.Recipients.Item(1)')='O'
      IF '@'$loReply.Recipients.Item(1).Address
         lcAddress=loReply.Recipients.Item(1).Address
         llOk=.T.
      ENDIF
   ENDIF

   * If the first method failed
   IF NOT llOk
      IF TYPE('loReply.Recipients[1]')='O'
         loRecipient=loReply.Recipients[1]
         IF NOT EMPTY(loRecipient.Address)
            IF '@'$loRecipient.Address
               lcAddress=loRecipient.Address
               ELSE
               IF '@'$loRecipient.Name
                  lcAddress=loRecipient.Name
               ENDIF
            ENDIF
            ELSE
            IF '@'$loRecipient.Name
               lcAddress=loRecipient.Name
            ENDIF
         ENDIF
      ENDIF
   ENDIF

ENDIF

REPLACE Address WITH LOWER(lcAddress)
I first try with the loReply.Recipients.Item(1) and then if that doesn't work, I go with 'loReply.Recipients[1]. However, despite as complex as it is, out of 374 emails, 32 was not able to be processed to retrieve the email of the sender. That represents 8.56% of failures. I really don't know how to solidy that routine to make sure I would get all of them. This automation is a very complex one and I sure hope it will be adjusted in an upcoming version.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform