Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MAPI Class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00752336
Message ID:
00756931
Views:
9
Sergey,

I was able to send attachments finally. My problem was that I had assigned the fil;esnames to a string like lcattchfiles = "C:\File1.txt,C:\Files2.txt' and when calling the send e-mail function I used &lcattachfiles. This was giving me problems.

Now I list the file names expilictly in the function call statement and it seems to be OK.

But generally, the error handler for the class does not seem to be very good. This is the part of the code that loads the mapi class.

***************

LOCAL loSession, ; && MAPI Session object
lcOnError, ; && Previous ON ERROR setting
lnError, ; && VFP Error number
lcFolder && Previous folder to reset

** Copy required environment settings
lcOnError=ON("ERROR")
lcFolder=SYS(5)+SYS(2003)
lnError=0

ON ERROR lnError=ERROR()

** Create a session object
loSession=CREATEOBJECT("MSMAPI.MAPISession.1")


** Reinstate copied settings
RELEASE loSession
ON ERROR &lcOnError
SET DEFAULT TO (lcFolder)

RETURN lnError


***************

And when I run the program on a PC where I have not registered the control, it errors at the line loSession=CREATEOBJECT("MSMAPI.MAPISession.1") . Even though the error handler is set, the default error handler displays an error message.

I will make sure that I have the latest version.

Thanks.

Ria
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform