Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MAPI Outlook Express question
Message
De
08/12/2001 19:43:20
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00588584
Message ID:
00591750
Vues:
25
Hi David,
Actually i need to automate to dialup to internet then automate to send out an email with attachment.After finish it will hangup automatically.
So i using MAPI to send email. But because of OE will check mail first as i issue the oleMAPIMessages.send(.f.). So it will hangup after check mail and the email still haven't send out.
Is it my MAPI code got problem ?
Or i can have other way to know OE had sent the mail then i automate to hangup the connection(wininet.dll) and not using OE auto hangup control.
Thanks

Below is my code :
oleMAPISession = createobject( "MSMAPI.MAPISession.1" )

* Signon to mail
with oleMAPISession
.UserName = ""
.Password = ""
.Signon()
* Check the SignOn status
if (.SessionID > 0)
oleMAPIMessages = createobject( "MSMAPI.MAPIMessages.1" )
* tell the message the SessionID
oleMAPIMessages.SessionID = .SessionID
*debugout "Successful mail log on"
else
*debugout "Mail login failed"
.singoff()
return
endif
endwith

* Send an email

with oleMAPIMessages
.Compose()
* Set the Recipient name and resolve
.RecipDisplayName = "kengwen@yahoo.com"
.RecipType = 1
.ResolveName()
.MsgSubject = "Testing"
.MsgNoteText ="Alarm trigger time :"
.AttachmentPathName="C:\Netlog.txt"
.Send(.f.)
endwith

* Signoff
oleMAPISession.Signoff()

kengwen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform