Main Board > Web Services

*web/email not working with PxPlus Webserver

(1/2) > >>

Ken Sproul:
I have a PxPlus Webserver background process with a web request program that uses *web/email to send emails from the server.  If I substitute it with *web/mail, the email is sent with no problem.

The message I'm getting from *web/email is:
Sending to SMTP Server Failed: (0): Connect to SMTP Server: unc-address;25 timed out. (0/115).

So why is *web/email having this problem and *web/mail is not?  Any help will be appreciated.

Devon Austen:
Hi Ken,

If you are using PxPlus 2016 or newer you can try to use the *web/testemail utility.

CALL "*web/testemail;test_name",from$,smtp_server$,username$,password$,to$

This will allow you to do a very simple test of *web/email. If it works it will display the *web/email command it used. This helps make sure you are calling it correctly. If it doesn't work it lets you know that none of the extra options are to blame.

The difference between the two programs I believe is that *web/email is our full featured email utility while *web/mail is a older simple bare bones utility. It is possible that a difference in how they are implemented is why one works but one doesn't.

The *web/mail program has a 20 second timeout. While *web/email uses whatever timeout you specify. If not specified passed in as 0 then it defaults to 60 seconds. Are you passing in a value to *web/email less than 20 for timeout?

Ken Sproul:
In this case it is not PxPlus 2016.  We actually have another background process on the same server executing the same code that the webserver process is executing and the *web/email call works perfectly in that process.  So it's something different about the webserver process that I cannot figure out.  I'm passing all the same values in the *web/mail call for the equivalent arguments of the *web/email call.  I'm not passing any timeout value to *web/email and it's taking the full 60 seconds to fail based on the time stamps of the logging that we're doing.

This really is perplexing because it's a very simple text/html email with the server address, port 25 specified, from address, reply address same as from, one to address, a subject, and a very short message.  No authentication, ssl, cc addresses, bcc addresses, or attachments.

Devon Austen:
I would look at the documentation for *web/email (https://manual.pvxplus.com/?Web%20Utilities/Email%20Utility/Overview.htm) carefully and make sure you are calling it correctly. It is fairly common to get one of the arguments wrong and that can cause issues.

Another possibility is internet security or antivirus software blocking the process from connecting.

Ken Sproul:
The exact same *web/email call works outside of the webserver process.  This exact same code is executed in another background process with no issue. It has something to do with the webserver background environment, just not sure what that could be.  If *web/mail works, *web/email should also work.  It would be nice to know what it is doing differently that would cause the error 0.

Navigation

[0] Message Index

[#] Next page

Go to full version