Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email resolve problem
Message
From
21/03/2001 13:05:09
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Email resolve problem
Miscellaneous
Thread ID:
00487303
Message ID:
00487303
Views:
38
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
Next
Reply
Map
View

Click here to load this message in the networking platform