https://userapps.support.sap.com/sap/support/knowledge/en/1324700
1324700 - SMTP_to function gets a RWSocket::connect: connrefused | SAP Knowledge Base Article
When calling the SMTP_To function to send an email we get a connection refused error message (RWSocket::connect: connrefused).