Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Email resolve problem
Message
De
21/03/2001 13:05:09
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Email resolve problem
Divers
Thread ID:
00487303
Message ID:
00487303
Vues:
39
If there is a bad email address, is it possible to delete the email address after it has being added to the receipt list.
I’m assuming one has to add it (.Recipients.Add) in order for the resolve to work.
See code below.

Thanks
Anthony


Local loApplication, llActive, loMapiSpace, loInbox, loNew, I , cAttachlemts

#Include office97.h
#include 'pda.h'

With THISFORM

If empty(.txtTo.value)
.txtTo.Setfocus
Messagebox("You must enter an email address", mb_iconstop, .caption)
Return
Endif

loApplication = CreateObject( "Outlook.Application" )

llActive = ( varType( loApplication ) = "O" )

If llActive
loMapiSpace = loApplication.GetNameSpace("MAPI")
loInbox = loMapiSpace.GetDefaultFolder(olFolderOutBox) &&6
loNew = loInbox.Items.Add(olMailItem)

With loNew
With thisform.listmgr1
.init()
.add_items(ALLTRIM(thisform.txtTo.value))
Local I
For I = 1 TO .itemcount
With loNew.Recipients.Add(thisform.listmgr1.array[1,i])
.Type = olTo
If Not .Resolve
Messagebox("Unable to resolve address.")
*****************************************************************************
This is were I would like to Delete the email address
*****************************************************************************
Endif
Endwith
Endfor
Endwith

.to = ALLTRIM(thisform.txtTo.VALUE)
.Subject = ALLTRIM(thisform.txtSubject.VALUE)
.Body = thisform.txtDetails.VALUE
.Importance = thisform.OpgImportance.value - 1
.readReceiptRequested = ThisForm.chkRetReceipt.value
If ThisForm.chkDialog.value = 1
.Display
Else
.Send()
Endif
Endwith
Endif
Endwith
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform