Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MAPI with Attachments
Message
 
 
To
28/07/2003 21:45:09
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Miscellaneous
Thread ID:
00814212
Message ID:
00814399
Views:
29
This class doesn't have a good error handler. You'll have to modify it to get actual OLE error.
PROCEDURE Error
	LPARAMETERS tnError, tcMethod, tnLine
	LOCAL laError[1]
	IF tnError = 1429	
		AERROR(laError)
		This.AddError("VFP Error:" + LTrim(Str(tnError)) + ':' + ;
				tcMethod + ':' + LTrim(Str(tnLine)) + ;
				" :" + laError[3])
	ELSE	
		This.AddError("VFP Error:"+LTrim(Str(tnError))+':'+tcMethod+':'+LTrim(Str(tnLine)))
	ENDIF	
ENDPROC
Tell you truth, we are using this class for a couple of years and never had an error on the .send. Most likely MAPI isn't installed or configured properly on your PC.

>This.nerrors=1 and at the point the error message in This.aerrors is VFP Error 1429 Sendmail 184
>
>
>>In the sendmail method try to replace the last
RETURN 0
>>* with
>>RETURN This.nErrors
Or check o.geterrorcount() in addition to return value.
>>
>>>Once again I'm in awe of how quickly you can respond < s >
>>>
>>>I have tried the class and it appears to be working - i.e. the sendmail method returns 0 indicating no errors. Problem is, also no email. Stepping through the method code I find everything is exactly as expected until stepping into the .Send(llShowOutlook). There I find I'm in the error routine and the error is the 1429 OLE error. Oddly, the .send(llShowOutlook) doesn't effect the return value so the method leaves returning 0
>>>
>>>In any case, no clue as to what is going on now. It successfully created the mapi objects etc
>>>
>>>here's my test code:
>>>
>>>
>>>
>>>SET CLASSLIB TO mapimail.vcx additive
>>>
>>>o=CREATEOBJECT("cusmapi")
>>>
>>>lctext="This is the message to be sent by MAPI"
>>>lcfile="mapimail.txt"
>>>
>>>lreturn = o.sendmail("SCHARNAS","asstcpa","chankey@f1tech.com","TEST",lctext,lcfile,.t.,.t.,.f.)
>>>
>>>RETURN "I AM DONE AND lreturn = "+STR(lreturn)
>>>
>>>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform