*web/email error message (0/117)

Started by Ken Sproul, May 12, 2021, 08:16:19 PM

Previous topic - Next topic

Ken Sproul

I'm having trouble with *web/email returning an error 0 with the following message:
Sending to SMTP Server Failed: (0): Connect to SMTP Server: server-name;25 timed out. (0/117).

Pxplus Version: 15.10
Windows Version: Windows Server 2012 R2 Standard


I can open "[tcp]server-name;25" with no error.  I can write smtp commands to the channel to send an email.  I can use *web/mail to send an email with no error.


This same server has an older version of PxPlus and *web/email works fine with the older version.


I checked permissions in the pvx and lib directories and don't see any issues, although I cannot rule it out.


What is *web/email trying to do (assuming at line 117) that is resulting in a busy error?


New info.  The server is a local smtp server on port 25 without user authentication.  So I changed the server to "smtp.gmail.com;465-secure;username;password" using my own username/password and it worked without an error.  Hopefully this is a clue.

Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

ChrisKCAi

I'd like to add a "me too". Windows 2016 server; PxPlus V16.20 but same symptom. Local SMTP server/port 25/no authentication - *web/email works fine in V10.20 but returns the 0/117 error when running in V16.20

Mike King

One thing that was added to *web/email with the more current version was its support of STARTTLS which, when it receives acknowledgement from the SMTP server that it supports TLS, causes *web/email (technically *web/smtp) to start a TLS/SSL connection.

Its possible that could be causing the problem -- perhaps your server requesting STARTTLS but not having a valid certificate for TLS use.

Also, did you check to see if there was any sort of error message returned in the errormsg$ argument of *web/email?




Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Ken Sproul

Mike, thanks for the info.  This is the message received:
Sending to SMTP Server Failed: (0): Connect to SMTP Server: server-name;25 timed out. (0/117).
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

Mike King

Okay -- What is your timer set to in the call to *web/email?

Does increasing the timeout setting in the call increase the time before you get the error (technically the error we get from the OS is somewhat generic so our message that the issue is a timeout is best-guess of most common reason for the OS error condition returned).

Also if this is easily reproducible, you might try doing the send email while you have a trace file or trace window open.  The smtp interface has a number of trace messages in it that can help track its progress.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Ken Sproul

Mike, there is no timeout specified and it takes 60 seconds to get the error.  I tried a timeout of 10 seconds and it errored in 10 seconds.  I'll see what happens with the trace window.
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

Mike King

Make sure your smtp server name and port is correct since it sounds like it cannot resolve the connection.

Also, are you running this as a service and if so do you know if the service has access to the internet.  Often services are prevented from accessing the Internet and you have to use a privileged user to run the service.  Try directly opening a connection to the port from the same server/service to see if it works.

Line 117 (again assuming this is the correct line) is simply an OPEN to the server specified with a timeout.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Ken Sproul

Mike,


The error occurs in a foreground process.


I have successfully done this with no error:
open (1)"[tcp]server-name;25"


In addition, I have written smtp commands to the open channel to send an email.  Have also used *web/mail in a foreground process to successfully send the email.


It is only *web/email that produces the error.  I'll try the trace you suggested later.
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

Ken Sproul

#8
Mike, below are the trace results.  Hopefully it provides some clues for you.

0220 ok=0; call "*web/email",err=*next,from_addr$,"",to_addr$,"","","(*web/email) "+subject$,body$,"","",server$+";"+port$+tbl(nul(username$),";"+username$+";"+password$,""),timeout,-1,"",1,err_msg$,"",""; ok=1
[/size]Error:17 Program=F:\infor\facts93\pvx\lib\_web\email@133 System errno=2
[/size]Error:17 Program=F:\infor\facts93\pvx\lib\_web\email@134 System errno=2
[/size]Error:17 Program=F:\infor\facts93\pvx\lib\_web\email@135 System errno=2
[/size]Error:17 Program=F:\infor\facts93\pvx\lib\_web\email@136 System errno=2
[/size]Error:17 Program=F:\infor\facts93\pvx\lib\_web\email@137 System errno=2
[/size]Open file(32767):F:\infor\facts93\pvx\lib\_web\webserv.mim   [Pgm=*web/email Stno=00147]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Open file(32766):F:\infor\facts93\pvx\lib\_web\outbox\new   [Pgm=*web/email Stno=01047]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Close file(32766):*web/outbox/new   [Pgm=*web/email Stno=01047]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Error:26 Program=F:\infor\facts93\pvx\lib\_web\email@991 System errno=13
[/size]Tried to open F:\infor\facts93\pvx\lib\_web\outbox\new\24593497234628c40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\_web\outbox\new\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\mods\_web\outbox\new\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\mods\prog\_web\outbox\new\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\prog\_web\outbox\new\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\hotkeys\_web\outbox\new\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\link\_web\outbox\new\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\mods\prog\CS\_web\outbox\new\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\prog\CS\_web\outbox\new\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\prog\_w\_web\outbox\new\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Error:12 Program=F:\infor\facts93\pvx\lib\_web\email@996 System errno=2
[/size]Error:14 Program=F:\infor\facts93\pvx\lib\_web\email@1004 System errno=2
[/size]Error:26 Program=F:\infor\facts93\pvx\lib\_web\email@991 System errno=2
[/size]Tried to open F:\infor\facts93\pvx\lib\_web\outbox\24593497234628c40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\_web\outbox\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\mods\_web\outbox\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\mods\prog\_web\outbox\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\prog\_web\outbox\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\hotkeys\_web\outbox\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\link\_web\outbox\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\mods\prog\CS\_web\outbox\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\prog\CS\_web\outbox\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Tried to open F:\infor\facts93\prog\_w\_web\outbox\24593497234628C40175.eml and failed   [Pgm=*web/email Stno=00996]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Error:12 Program=F:\infor\facts93\pvx\lib\_web\email@996 System errno=2
[/size]Error:14 Program=F:\infor\facts93\pvx\lib\_web\email@1004 System errno=2
[/size]Open file(32766):F:\infor\facts93\pvx\lib\_web\outbox\new\24593497234628c40175.eml   [Pgm=*web/email Stno=00534]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00565]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00566]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00578]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00579]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00586]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00602]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00605]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00606]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00612]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00613]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00614]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00629]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *web/outbox/new/24593497234628C40175.eml (32766)    [Pgm=*web/email Stno=00653]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Close file(32766):*web/outbox/new/24593497234628C40175.eml   [Pgm=*web/email Stno=00840]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Open file(32766):F:\infor\facts93\pvx\lib\_web\outbox   [Pgm=*web/smtp Stno=00523]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Close file(32766):*web/outbox   [Pgm=*web/smtp Stno=00527]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Open file(32766):F:\infor\facts93\pvx\lib\_web\outbox\sent   [Pgm=*web/smtp Stno=00523]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Close file(32766):*web/outbox/sent   [Pgm=*web/smtp Stno=00527]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Open file(32766):F:\infor\facts93\pvx\lib\_web\outbox\sent   [Pgm=*web/smtp Stno=00502]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Close file(32766):*web/outbox/sent   [Pgm=*web/smtp Stno=00507]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Open file(32766):*memory*   [Pgm=*web/smtp Stno=00081]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Open file(32765):F:\infor\facts93\pvx\lib\_web\outbox\new\24593497234628c40175.eml   [Pgm=*web/smtp Stno=00087]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Close file(32765):F:\infor\facts93\pvx\lib\_web\outbox\new\24593497234628c40175.eml   [Pgm=*web/smtp Stno=00092]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Write issued to *memory* (32766)    [Pgm=*web/smtp Stno=00094]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Open file(32765):[tcp];0   [Pgm=*web/smtp Stno=00351]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Close file(32765):[tcp];0   [Pgm=*web/smtp Stno=00354]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Error:0 Program=F:\infor\facts93\pvx\lib\_web\smtp@117 System errno=13
[/size]Close file(32766):*memory*   [Pgm=*web/smtp Stno=00316]<--[Pgm=*web/email Stno=00844]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Error:0 Program=F:\infor\facts93\pvx\lib\_web\email@844 System errno=13
[/size]Close file(32767):*web/webserv.mim   [Pgm=*web/email Stno=00901]<--[Pgm=TEST-EMAIL Stno=00220]
[/size]Error:0 Program=F:\infor\facts93\mods\TEST-EMAIL@220 System errno=2
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

Mike King

Sorry -- I should have asked you to also set %trace_email in Version 15.10 in order to get the trace output.

However looking at the trace I still think you have some form of firewall or permissions issue.

Have you tried issuing a call to *web/email manually and not just opening the port?

The program that fails, how is it run? 
Is it possibly running WindX and the call to *web/email is being done from the workstation?
How is the process that is issuing the call to *web/email running -- background as a service?  On the server but running as a service?

Now I also have some concerns about the first 5 lines with error 17's.  Those lines in *web/email are:

0133 ADDR "*web/email",ERR=*NEXT
0134 ADDR "*web/address",ERR=*NEXT
0135 ADDR "*web/base64",ERR=*NEXT
0136 ADDR "*web/qprint",ERR=*NEXT
0137 ADDR "*web/smtp",ERR=*NEXT

Something is off if those lines get error 17 -- this should only happen if the files and not programs but something else like a text file which you cannot ADDR.

Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Ken Sproul

#10
Below is the test program followed by the new trace and the screen output (server and email addresses changed to protect the innocent).


0010 ! test-email
0020 begin
0030 try_mail=0
0040 server$="server-name",port$="25",timeout=10
0050 username$="",password$=""
0060 from_addr$="facts@xxx.com"
0070 to_addr$="ken@dpiserve.com"
0080 subject$="Test Subject"
0090 body$="Test message."
0100 body$+=$0D0A0D0A$+"Server: "+server$+$0D0A$+"Port: "+port$
0110 if len(username$) then body$+=$0D0A$+"User: "+username$+tbl(nul(password$)," / "+dim(len(password$),"*"),"")
0120 print "Email Test",'LF',"=========="
0130 print "Server:",@(15),server$
0140 print "Port:",@(15),port$
0150 print "User:",@(15),username$,tbl(nul(password$)," / "+dim(len(password$),"*"),"")
0160 print "Timeout: ",@(15),str(timeout)
0170 print "From: ",@(15),from_addr$
0180 print "To: ",@(15),to_addr$
0190 print 'LF',"Subject: ",'LF',subject$
0200 print 'LF',"Body:",'LF',body$
0210 print 'LF',"Calling *web/email"; wait 0
0220 ok=0; call "*web/email",err=*next,from_addr$,"",to_addr$,"","","(*web/email) "+subject$,body$,"","",server$+";"+port$+tbl(nul(username$),";"+username$+";"+password$,""),timeout,-1,"",1,err_msg$,"",""; ok=1
0230 print 'LF',"Result:",'LF',tbl(ok,err_msg$,"Email sent.")
0240 if try_mail and not(ok) then {
0250 print 'LF',"Calling *web/mail"; wait 0
0260 ok=0; call "*web/mail",err=*next,server$+";"+port$,(from_addr$),(to_addr$),"(*web/mail) "+subject$,(body$),err_msg$; ok=1
0270 print 'LF',"Result:",'LF',tbl(ok,err_msg$,"Email sent.")
0280  }
0290 end


Trace with %trace_email=1

F:\infor\facts93\mods\TEST-EMAIL
0010 ! test-email
0020 begin
0030 try_mail=0
0040 server$="server-name",port$="25",timeout=10
0050 username$="",password$=""
0060 from_addr$="facts@xxx.com"
0070 to_addr$="ken@dpiserve.com"
0080 subject$="Test Subject"
0090 body$="Test message."
0100 body$+=$0D0A0D0A$+"Server: "+server$+$0D0A$+"Port: "+port$
0110 if len(username$) then body$+=$0D0A$+"User: "+username$+tbl(nul(password$)," / "+dim(len(password$),"*"),"")
0120 print "Email Test",'LF',"=========="
0130 print "Server:",@(15),server$
0140 print "Port:",@(15),port$
0150 print "User:",@(15),username$,tbl(nul(password$)," / "+dim(len(password$),"*"),"")
0160 print "Timeout: ",@(15),str(timeout)
0170 print "From: ",@(15),from_addr$
0180 print "To: ",@(15),to_addr$
0190 print 'LF',"Subject: ",'LF',subject$
0200 print 'LF',"Body:",'LF',body$
0210 print 'LF',"Calling *web/email"; wait 0
0220 ok=0; call "*web/email",err=*next,from_addr$,"",to_addr$,"","","(*web/email) "+subject$,body$,"","",server$+";"+port$+tbl(nul(username$),";"+username$+";"+password$,""),timeout,-1,"",1,err_msg$,"",""; ok=1
Call:*web/email   [Pgm=TEST-EMAIL Stno=00220]
Error:17 Program=F:\infor\facts93\pvx\lib\_web\email@133 System errno=2
Error:17 Program=F:\infor\facts93\pvx\lib\_web\email@134 System errno=2
Error:17 Program=F:\infor\facts93\pvx\lib\_web\email@135 System errno=2
Error:17 Program=F:\infor\facts93\pvx\lib\_web\email@136 System errno=2
Error:17 Program=F:\infor\facts93\pvx\lib\_web\email@137 System errno=2
*web/email: Parsing email arguments
Open file(32767):F:\infor\facts93\pvx\lib\_web\webserv.mim   [Pgm=*web/email Stno=00147]
Call:*web/address;BreakDown   [Pgm=*web/email Stno=00246]
Call:*web/address;BreakDown   [Pgm=*web/email Stno=00283]
*web/email: Creating email
Open file(32766):F:\infor\facts93\pvx\lib\_web\outbox\new   [Pgm=*web/email Stno=01047]
Close file(32766):*web/outbox/new   [Pgm=*web/email Stno=01047]
Error:26 Program=F:\infor\facts93\pvx\lib\_web\email@991 System errno=13
Tried to open F:\infor\facts93\pvx\lib\_web\outbox\new\24593497509628c40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\_web\outbox\new\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\mods\_web\outbox\new\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\mods\prog\_web\outbox\new\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\prog\_web\outbox\new\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\hotkeys\_web\outbox\new\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\link\_web\outbox\new\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\mods\prog\CS\_web\outbox\new\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\prog\CS\_web\outbox\new\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\prog\_w\_web\outbox\new\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Error:12 Program=F:\infor\facts93\pvx\lib\_web\email@996 System errno=2
Error:14 Program=F:\infor\facts93\pvx\lib\_web\email@1004 System errno=2
Error:26 Program=F:\infor\facts93\pvx\lib\_web\email@991 System errno=2
Tried to open F:\infor\facts93\pvx\lib\_web\outbox\24593497509628c40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\_web\outbox\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\mods\_web\outbox\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\mods\prog\_web\outbox\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\prog\_web\outbox\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\hotkeys\_web\outbox\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\link\_web\outbox\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\mods\prog\CS\_web\outbox\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\prog\CS\_web\outbox\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Tried to open F:\infor\facts93\prog\_w\_web\outbox\24593497509628C40211.eml and failed   [Pgm=*web/email Stno=00996]
Error:12 Program=F:\infor\facts93\pvx\lib\_web\email@996 System errno=2
Error:14 Program=F:\infor\facts93\pvx\lib\_web\email@1004 System errno=2
Open file(32766):F:\infor\facts93\pvx\lib\_web\outbox\new\24593497509628c40211.eml   [Pgm=*web/email Stno=00534]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00565]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00566]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00578]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00579]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00586]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00602]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00605]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00606]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00612]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00613]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00614]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00629]
Write issued to *web/outbox/new/24593497509628C40211.eml (32766)    [Pgm=*web/email Stno=00653]
Close file(32766):*web/outbox/new/24593497509628C40211.eml   [Pgm=*web/email Stno=00840]
*web/email: Sending emails to SMTP Server
Call:*web/smtp   [Pgm=*web/email Stno=00844]
Open file(32766):F:\infor\facts93\pvx\lib\_web\outbox   [Pgm=*web/smtp Stno=00523]
Close file(32766):*web/outbox   [Pgm=*web/smtp Stno=00527]
Open file(32766):F:\infor\facts93\pvx\lib\_web\outbox\sent   [Pgm=*web/smtp Stno=00523]
Close file(32766):*web/outbox/sent   [Pgm=*web/smtp Stno=00527]
Open file(32766):F:\infor\facts93\pvx\lib\_web\outbox\sent   [Pgm=*web/smtp Stno=00502]
Close file(32766):*web/outbox/sent   [Pgm=*web/smtp Stno=00507]
Open file(32766):*memory*   [Pgm=*web/smtp Stno=00081]
Open file(32765):F:\infor\facts93\pvx\lib\_web\outbox\new\24593497509628c40211.eml   [Pgm=*web/smtp Stno=00087]
Close file(32765):F:\infor\facts93\pvx\lib\_web\outbox\new\24593497509628c40211.eml   [Pgm=*web/smtp Stno=00092]
Write issued to *memory* (32766)    [Pgm=*web/smtp Stno=00094]
Open file(32765):[tcp];0   [Pgm=*web/smtp Stno=00351]
Close file(32765):[tcp];0   [Pgm=*web/smtp Stno=00354]
*web/smtp: Try to connect to SMTP server
Error:0 Program=F:\infor\facts93\pvx\lib\_web\smtp@117 System errno=13
*web/smtp: [ERROR] Connect to SMTP Server: server-name;25 timed out. (0/117).


Close file(32766):*memory*   [Pgm=*web/smtp Stno=00316]
Error:0 Program=F:\infor\facts93\pvx\lib\_web\email@844 System errno=13
*web/email: [ERROR] Sending to SMTP Server Failed: (0): Connect to SMTP Server: server-name;25 timed out. (0/117).


Close file(32767):*web/webserv.mim   [Pgm=*web/email Stno=00901]
Error:0 Program=F:\infor\facts93\mods\TEST-EMAIL@220 System errno=2
0230 print 'LF',"Result:",'LF',tbl(ok,err_msg$,"Email sent.")
0240 if try_mail and not(ok) then {
0280  }
0290 end


Screen output:

Email Test
==========
Server:        server-name
Port:          25
User:
Timeout:       10
From:          facts@xxx.com
To:            ken@dpiserve.com


Subject:
Test Subject


Body:
Test message.


Server: server-name
Port: 25


Calling *web/email


Result:
Sending to SMTP Server Failed: (0): Connect to SMTP Server: server-name;25 ti
med out. (0/117).

Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

Ken Sproul

Regarding the error 17's with the addr's.  It seems that the error 17 only occurs if the program is already addr'd.  When I drop "*web/email" and then addr "*web/email", no error occurs.  When I do a second addr "*web/email", the error 17 occurs.
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

Ken Sproul

Mike,


This makes no sense!  I can reproduce the error by opening the server/port with a tim= clause in the open.  If I exclude the tim= clause in the open, no error occurs!


This works:
open (1)"[tcp]server-name;25"


This generates an error 0 after 10 seconds:
open (1,tim=10)"[tcp]server-name;25"

Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

Mike King

Something fishy about your error 17 -- I just tried this on version 15.10 and didn't get any errors:

PxPlus-2018 Web (Ver:15.10/MS-WINDOWS) Serno:1510-001-1234567
(c) Copyright 2005-2018 PVX Plus Technologies Ltd. (All rights reserved)
  Website: http://www.pvxplus.com
->10 addr "*web/email"
-:20 addr "*web/email"
-:30 addr "*web/email"
-:40 addr "*web/email"
-:run
-:


As for your problem with Email I have attached a replacement *web/smtp which doesn't have a TIM= on the open -- No idea why your system would have a problem with the TIM= but its worth a try to see if it works.  (This is a V15.10 *web/smtp with not TIM= on the OPEN)

Of course -- seeing you are getting some odd results with the ADDR directive perhaps your installation is bad.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Ken Sproul

I agree, something's not right.  I'm going to recommend a reinstall of pxplus to see if that clears things up.
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC