Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 0x800401f3 while sending E-mail from VFP
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Error 0x800401f3 while sending E-mail from VFP
Miscellaneous
Thread ID:
00554324
Message ID:
00554324
Views:
153
We are using VFP 5 and ReFox level 2 (highest) to brand our application and generate an .EXE.
We are using the code below which was posted on MSDN to create an E-mail. No errors occur at our office on W98 workstations. This is true whether we run the application from an APP, .Exe or ReFox branded .EXE.
However, when we run the ReFox branded .EXE on our clients' W98 notebook an error '0x800401f3 invalid class string' error occurs.
Any assistance is greatly appreciated with this urgent problem.

Code:
* Create an instance of a form, and then add the MSMAPI.MAPISession and
* MSMAPI.MAPIMessages OLE controls to that form:

oform = CreateObject("form")
oform.addobject("Session1","olecontrol","MSMAPI.mapiSession")
oform.addobject("Message1","olecontrol","MSMAPI.mapiMessages")

* Call the Signon method of the MAPISession control. If the user is not
* logged into mail, this will prompt the user to sign on. This also sets
* the SessionId property for the MAPIsession control:

oform.Session1.signon

* Set the SessionId of the MAPIMessage control to the SessionId of the
* MAPISession control, which was just obtained:

oform.Message1.sessionid = oform.Session1.sessionid

* Compose an e-mail message and set the subject line and Message text:

oform.Message1.compose
oform.Message1.msgsubject = "Orders from: " + syscomm.cSlpName
oform.Message1.msgnotetext = "Attached are my orders."

oform.Message1.Recipaddress = syscontr.emailordto

oform.Message1.AttachmentIndex = 0
oform.Message1.AttachmentPathName = thisform.attachmentname

* Sends the e-mail message. The (1) is required to send the message.

oform.Message1.send(1)
* Optionally, sign off from mail:

oform.Session1.signoff

* Optionally, release the objects if they are no longer needed:

Release oform
Regards,

Allan Coganovitch
allanc@proven-solutions.com
Next
Reply
Map
View

Click here to load this message in the networking platform