Help Postie

Started by JP, January 03, 2020, 05:55:34 PM

Previous topic - Next topic

JP

I've been away from Winbatch for a few years and I'm trying to use it again to solve some problems I'm having.

The first issue I having is with the Postie extender. I copy the sample Send Text script into Studio and made only some changes. I run it and get the error message of "error= -1".

I can't find what the error code of -1 means. I also have search for and could not find a concise list of all the values for the "flag" field?

Can you suggest where I can find the information or help with the problem?

    AddExtender("WWPST44I.DLL") 
    host="outbound.mailhop.org"
    fromaddr="j**********.net"
   userid="*********"
   password="*********"
   port="465"
   tls="tls"
   tolist="j**********.net"                                         
   cclist=""
   bcclist=""
   subject="Test Message"
   mymsg="This is a test message, please ignore"
   attachments=""                                 
   flags="eh"
   kInit(host,fromaddr,userid,password,port,tls)
   kDest(tolist,cclist,bcclist)
   ret = kSendText(subject,mymsg,attachments,flags)
   If ret == 0
      errline=kStatusInfo()
      Message("ErrLine",errline)
   EndIf

Thanks,

JP

td

It is unclear what you mean by "error= -1".   This text usually is part of an error message returned by kStatusInfo.   Error text returned by the function generally but not always contains additional text including ESMPT/SMPT error number and a brief description.  You can find more information about ESMTP  errors returned by the function in the functions documentation in the Consolidated WIL Help file.  If you look at the kStatusInfo function's documentation you will find a link to SMTP (including errors) documentation at the www.faqs.org website.  Basically, it boils down to one or more of the parameters you are using is causing an error return from the SMTP server.

The description for the kSendText function's flag parameter can be found in the function's documentation in the Consolidated WIL Help file. 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

Don't know if this applies in your case but one common problem sometimes encountered is the port specification.  Newer SMTP server setups use port 587 instead of 456.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JP

The actual error message was:

    Could not connect to server: outbound.mailhop.org:465, error= -1

If I used the TLS option without the port number I get:

    Could not connect to server: outbound.mailhop.org:25, error= -10013

Which indicates the wrong port number. I checked my email program and it is using 465 and is working fine.

Thank you for pointing out the Consolidated WIL Help file, I had forgotten about it and found the flag values.

I am also reviewing the KStatusInfo function and the links to SMTP documentation on faqs.org.

JP

td

The documentation for your SMTP server indicates that you can use "465 (default), 587 or 10465".  Interesting but not particularly useful.  You could try specifying "SSL" instead of "TLS".  The documentation is not specific but strongly suggests that your SMTP server uses the newer TLS so using "SSL" is likely not to fix your problem.


FWIW, error -10013 is a permission denied error which more or less fits with the notion of using the wrong port which you were obviously doing.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JP

I finally figured out the problems (yes there were two). The first was my password was being blocked by the SMTP server for a unknown reason, a password that I've used forever. The server folks say that they are not blocking it but I can change the password to a new one and it works. When I change it back to the old one it fails.

The second is that the SMTP server requires TLS for port 465, which I have to use to get around my ISP's block of port 25. However, when I put "tls" in the security parameter it fails. But they still support ssl so I can use that and it works.

Thanks for the help!

JP

td

SSL is the older version of the secure socket layer protocol.  TLS is the name for the newer redesigned versions of the same protocol.  Obviously, Postie supports both the old and newer versions.   The older SSL protocol is highly vulnerable to exploits like POODLE so you do not see it supported by SMTP servers as much anymore. 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JP

Fortunately, I'm not using Postie for critical or sensitive emails, no national security stuff.

JP

td

I often use an SMTP server that is still on the old SSL protocol myself.  That said, you would be surprised what seemingly innocuous bits of information or email message modification an unreformed hacker can use for nefarious purposes.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade