I.T. Discussion Community!
-Collapse +Expand
Prestwood IT
Search Group:

Advanced
-Collapse +Expand Prestwood IT Store

Prestwood eMagazine

August Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyPrestwood IT Solutions BoardpsSendMail DLL Topic   Print This     

problem with psSendmail and Paradox 10

problem with psSendmail and Paradox 10 in psSendMail DLL topic (part of our Prestwood IT Solutions group).

Quick Search: problem   psSendmail   Paradox   problem psSendmail   problem psSendmail Paradox  
jayq00
-- USA
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 13 years ago (Thread Starter)
Comment Quote
About jayq00 -Collapse +Expand
Visit Profile
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=5351
Last Reply Posted 6/5/2007 10:09:50 AM)
Location=-- USA 
Joined=13 years ago   MB Posts=1  
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.

--
Mike Prestwood
Prestwood IT Solutions

 Posted 13 years ago
Comment Quote
About Mike Prestwood -Collapse +Expand
Visit Profile
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)
YouTube, Prestwood IT YouTube Channel (Visit My Channel)
Website, My drum website where I sell my drum books. (http://www.play-drums.com)

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 
Joined=20 years ago   MB Posts=1410   KB Posts=1805   KB Comments=69   BLOG, Topics=4  
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.

Dan Fought
Senior Programmer Analyst
Prestwood IT Solutions
http://www.prestwood.com

 Posted 13 years ago
Comment Quote
About Daniel Fought -Collapse +Expand
Visit Profile
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. 
Joined=18 years ago   MB Posts=401   KB Posts=12   KB Comments=4  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1135A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #11589 Counter
5351
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech