Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MAPI problem! Big Rush!!!
Message
From
11/03/1997 15:49:42
Paul Watson
Mcv Global Systems, Inc.
Pasadena, California, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
MAPI problem! Big Rush!!!
Miscellaneous
Thread ID:
00023779
Message ID:
00023779
Views:
77
I have an application that creates a DBF and then sends it via E-mail to a recipient. It worked great in testing sending it to myself. The only documentation I have is from an "Inside Visual FoxPro" article from last September. Anyway, it appears that the attachment isn't actually being sent. Instead, a link or shortcut gets sent. If you happen to have the attachment on your system, like I did during testing, you don't see the problem. Here's my code:

IF TYPE('oSession') <> 'O'
oSession = CREATEOBJECT('MAPI.Session')
oSession.Logon("Windows Messaging Settings",.f.)
ENDIF
oMessage = oSession.OutBox.Messages.Add()
oMessage.Subject = cEmailSubject
oMessage.Text = cEmailText
oAttach = oMessage.Attachments.Add()
oAttach.Type = 2
oAttach.Source = cAttachSource
oAttach.Name = cAttachName
oRecipient = oMessage.Recipients.Add()
WITH oRecipient
.Name = TRIM(MadHatter.cEmail)
.Address = 'SMTP:'+TRIM(MadHatter.cEmail)
.AddressEntry.Type = "SMTP"
.AddressEntry.Address = TRIM(MadHatter.cEmail)
ENDWITH
oMessage.Update()
oMessage.Send(.T.,.F.)

cAttachSource is a pathname to the file. cAttachName is just the file name. I have tried using the full pathname here, but that doesn't work either.

Of course I am in a MAJOR rush here. What am I doing wrong and how can I fix it in the next few minutes :-)

Thanks,

Paul
Paul Watson
MCV Computer Consultants
MCV Global Systems, Inc.
pWatson@PrimeNet.Com
Next
Reply
Map
View

Click here to load this message in the networking platform