Send does not work, gives WaitingForDNS error yet connect() doesn't fail

Hi @benprachtrsi , I think this is a duplicate of another thread you opened on this topic . Did you get a chance to review @Tamimi 's response to check for the UP_NOTICE before attempting to send a message?
Can you attempt to register an event listener for the UP_NOTICE event and execute your publish command after that?
The other thread has a good discussion around this - let us track it there. Hope that should be fine!