John,
Did you ever resolve the problem? I just ran into the same issue using the smtp package. It would work from the testing tool but when run from with in cloverleaf tps I could get a could not open socket error and it would return a -1. We ended up writing a standalone mail tcl script that we then called with in the tps using exec and this works. For some reason cloverleaf will not let you open a socket from with in the engine directly.
John Mercogliano
Semi Retired, contractor
Hampton Roads, VA