Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exception 4096
Message
De
15/04/2004 02:16:49
 
 
À
12/04/2004 11:22:39
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00894062
Message ID:
00895026
Vues:
18
Efrain. You are not testing the validity of email address' before addng them. Are you sure they are valid? The error message implies they might not be. I would a) ensure the email address' are properly formatted. You could use a regular expression test. b) I would write all email address' to a text file for debugging purposes using STRTOFILE() before adding the address to the mail object. This would allow me to double check the address on a machine where the code fails.



>Hello:
>
>I am running an application in several machines. Every one use Win2k and MSOffice 2000. The application uses an automation to send Emails to different destinataries. The fact is, this feature works in some computers, but in others release a error message. The error message said:
>
>"Error#1429-OLE IDispatch execption code 4096 from Microsoft Outlook: Outlook doesn't recognize one or more names...- Outlook doesn't recognize one or more names."
>
>Any idea about this?
>
>The code used to send emails is:
>
>[
>oItem.subject=ALLTRIM(Thisform.txtsubject.Text)&&"Policy Services: "+VarReport
>oitem.HTMLbody = VarContent
>IF NOT EMPTY(VarAttachment )
> IF RIGHT(ALLTRIM(VarAttachment ),1) = '\'
> tx=ADIR(GDir,VarAttachment+"*.*")
> FOR tw=1 TO tx
> oAttachment = oItem.Attachments.Add(VarAttachment+GDir(tw,1))
> NEXT tw
> ELSE
> oAttachment = oItem.Attachments.Add(VarAttachment)
> ENDIF
>ENDIF
>IF thisform.lstEMailTo.ListCount>0
> FOR ty=1 TO thisform.lstEMailTo.ListCount
> oitem.Recipients.Add(thisform.lstEMailTo.ListItem(ty))
> NEXT ty
>ELSE
> oemail=null
> return(.f.)
>ENDIF
>
>IF thisform.lstEMailCC.ListCount>0
> FOR ty=1 TO thisform.lstEMailCc.ListCount
> VarCc = VarCc+";"+thisform.lstEMailCc.ListItem(ty)
> NEXT ty
> VarCc=substr(VarCc,2)
> oitem.CC = VarCc
>ENDIF
>
>IF thisform.lstEMailBCC.ListCount>0
> FOR ty=1 TO thisform.lstEMailBCc.ListCount
> VarBCc = VarBCc+";"+thisform.lstEMailBCc.ListItem(ty)
> NEXT ty
> VarBCc=substr(VarBCc,2)
> oitem.BCC = VarBcc
>ENDIF
>
>oitem.Send
>
>
>
>oEmail=null
>
>thisform.Release()
>
>]
>
>Thanks
>
>Efrain Contreras
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform