Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MAPISession and MAPIMessage
Message
 
 
To
13/05/1998 10:34:11
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00099035
Message ID:
00099079
Views:
24
John,

I think you have to call ResolveName() even though you supply an email address and not a name to look up. I don't bother setting AttachmentPosition. This has some other junk from my class because I keep an VFP array of filenames
with this.oleMAPIMessages
   this.mnAttachmentCount = this.mnAttachmentCount + 1
   dimension this.maAttachments[this.mnAttachmentCount]
   .AttachmentIndex = this.mnAttachmentCount - 1
   .AttachmentPathName = pcFileName
   i = rat( "\", pcFileName )
   this.maAttachments[this.mnAttachmentCount] = substr( pcFileName, i+1 )
   .AttachmentName = this.maAttachments[this.mnAttachmentCount]
   .AttachmentType = 0
endwith</b>
>ThisForm.OLESessionMAPI
> .LogonUI=.F.
> .NewSession=.F.
> .Username="TestUsername"
> .Password="TestPassword"
>
> .SignOn()
>ENDWITH
>
>WITH ThisForm.OLEMessageMAPI
> .SessionID = ThisForm.OLESessionMAPI.SessionID
> .Compose()
>
> .MsgType = ""
> .MsgSubject = "CAMPAIGN FILES"
> .MsgNoteText = "Here it is..."
>
> .AttachmentIndex = .AttachmentCount + 1
> .AttachmentName = "Ca000001.txt"
> .AttachmentPathName = "C:\Email\Ca000001.txt"
> .AttachmentPosition = 12
> .AttachmentType = 0
>
> .RecipIndex = .RecipCount + 1
> .RecipAddress = "vlahosj@total.net"
> .RecipDisplayName = "John Vlahos"
> .RecipType=1
>
> .Send()
>ENDWITH
>
>ThisForm.OLESessionMAPI.SignOff
>ThisForm.Release()
>
><
>
>Thank you,
>John Vlahos
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform