Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MAPI Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00859160
Message ID:
00859243
Vues:
12
Kevin,

Here's a fragment from the article on my website that might help:

.RecipDisplayName = "DavidFrankenbach@worldnet.att.net"
.RecipType = 1
.ResolveName()

It's been quite a while since I did much work with MAPI, but I'm pretty sure the ResolveName() call is needed to get everything really setup to send the email.

>In the following code, I'm getting an "Unspecified error occured"
>on the line oMessages.Send()
>
>Anyone know what's wrong here?
>
>
>
>cLoginName = "loginname"
>cPassword = "password"
>cRecipient = "kmarois@comcast.net"
>cSubject = "Test Email"
>cBody = "This is a test
>*cAttachment = "d:\projects\vfp1\email\test.txt"
>
>
>oSession = CREATEOBJECT("MSMAPI.MAPISession")
>oMessages = CREATEOBJECT("MSMAPI.MAPIMessages")
>
>WITH oSession
>  .DownLoadMail = .T. 								
>  .LogonUI= .F.
>  .UserName = cLoginName
>  .Password = cPassword
>  .SignOn()
>ENDWITH
>
>
>oMessages.SessionID = oSession.SessionID
>oMessages.Compose()
>oMessages.RecipAddress = cRecipient
>oMessages.MsgSubject = cSubject
>oMessages.MsgNoteText = cBody
>oMessages.Send(.T.)
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform