problem with psSendmail and Paradox 10
jayq00
I am using psSendmail 1.1 and Paradox 10 10.0.0.990 on a Windows 2000 Pro SP4 machine. The code below (from a script) sends the message but disappears at the "lngRetVal = SendMsg(strMsgText)" instruction. The email is sent but Paradox keeps running and consumes a 1500 Mhz P-4. I have to close Paradox to get back to normal usage. Any thoughts? below is part of the script: Uses psSendMail QuickSend(Host Cptr, strFrom Cptr, SendTo Cptr, Subject Cptr, MsgText Cptr ) clong ;for longint Connect( xHost cptr) clong ;0 (Connected) -1 (Not Connected) InitMsg( xHost cptr, xmsgFrom cptr, xmsgTo cptr, xCC cptr, xBCC cptr, xSubject cptr) clong ;0 (No Error) -1 (No Host specified) -2 (No from e-mail address supplied) -3 (No send to e-mail address(es) supplied) Attach( xFilename cptr)clong ;0 file found, -1 couldn't find file to attach SendMsg( xMsgText cptr)clong ;0 (No Error) -1 (MsgText is blank) -2 (Error occurred while sending message) Quit() endUses method run(var eventInfo Event) var strHost, strFrom, strSendTo, strCC, strBCC, strSubject, strMsgText, strFileName string lngRetVal longint ;;0 no error, -1 no message, -2 error while sending endVar fStat.open(":getXOS:status.fsl") fStat.setTitle("GETXOS status") . . . . strHost = "192.168.0.8" strFrom = "paradox@xytronics.com" strSendTo = "jquesenberry@xytronics.com" strCC = "jay@userfcs.com" strBCC = "jay@userfcs.com" strSubject = "test 0703051611" strMsgText = sLine ;;connect to the mail server lngRetVal = Connect(strHost) if lngRetVal = 0 then ;0 (Connected) -1 (Not Connected) message("connected") sleep(1000) else msginfo("Mail Error","Error Connecting") Quit() return endif ;;set the header info if (InitMsg(strHost, strFrom, strSendTo,strCC, strBCC, strSubject)=0) then {0 (No Error) -1 (No Host specified) -2 (No from e-mail address supplied) -3 (No send to e-mail address(es) supplied) } message("Setting Header") sleep(1000) else msginfo("Mail Error","Header information incorrect") Quit() return endif ;;send the message lngRetVal = SendMsg(strMsgText) switch case lngRetVal = 0 : ;0 (No Error) ;-1 (MsgText is blank) ;-2 (Error occurred while ;sending message) message("Sending message") sleep(1000) case lngRetVal = -1 : msginfo("Mail Error","Message is blank. \nError No. "+strval(lngRetVal)) Quit() return case lngRetVal = -2 : msginfo("Mail Error","Error in sending message. \nError No. "+strval(lngRetVal)) Quit() return otherwise : msginfo("Mail Error","Unknown Error") Quit() return endswitch MsgInfo("","Messge sent") exit() endMethod
Posted 15 years ago (Thread Starter)
About jayq00
Approved member.
Member subscribes to this thread with a verified email.
Post ID #11589, 2 replies
Thread Started 3/5/2007 2:05:00 PM
View Counter=5421
Last Reply Posted 6/5/2007 10:09:50 AM)
Location=-- USA
Moderator
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA
Are you still having issues with this? We do have a new psSendMail 2.0 coming out this month but I don't think it addresses this issue specifically.
Posted 15 years ago
About Mike Prestwood
Approved member.
Member subscribes to this thread with a verified email.
About Mike Prestwood
Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions . Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books . If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.
Web Presence
Facebook , Prestwood IT Facebook page -- fan page. (Visit Me )
Twitter , Follow Prestwood IT on Twitter. (Visit Me )
LinkedIn , Prestwood IT company page on LinkedIn. (Visit Me )
Post ID #11737 (Level 1.1)
Reply to 11589
Thread Started 6/3/2007 9:42:01 PM
View Counter=2
Last Reply Posted 4/21/2009 9:21:17 AM)
Location=Prestwood IT office in Citrus Heights, CA
Most Recent Post
Daniel Fought
Prestwood IT
Home office in Fresno, CA.
I think the issue may be that while you have declared strMsgText as a string variable you have not declared sline. I do not see where the value for sLine is set and therefor you may be passing an unassigned value to the dll. This may cause unforseen problems, make sure strMsgText has a value. Probably even an empty string would work.
Posted 15 years ago
About Daniel Fought
Approved member.
Member subscribes to this thread with a verified email.
About Daniel Fought
Danial Fought is a senior programmer analyst with
Prestwood IT where he develops
custom Windows software and
custom websites . When Dan is not coding for clients, he participates in this online community. Coding specialties include Paradox/ObjectPAL, MS Access, Visual Basic, and VS.Net/VB.Net.
Post ID #11777 (Level 1.2)
Reply to 11589
Reply Posted 6/5/2007 10:09:50 AM
Location=Home office in Fresno, CA.
Revive Thread!
Add a comment to revive this old thread and make this archived thread more useful.
Thread #11589 Counter
5421
Since 4/2/2008