This script works fine in my development environment both via the testing tool and when I apply the script to Pre Proc routing.
The script works fine in my production environment via the testing tool but when I apply the script to Pre Proc routing (same as I did in DEV) Cloverleaf appears to be killing the connection to the email server before it even has a chance to send the message to the server.
When I run a packet trace via Wireshark I can clearly see Cloverleaf is sending a Reset ACK message to the email server thus terminating that connection. (see attachment)
Here is the snippet of the code that sends the email:
if {[regexp {x0a} $dg1_03] || [regexp {x0a} $dg1_04]} {
package require mime
package require smtp
package require html
set msg [string map
set msg [string map
set token [mime::initialize -canonical text/html -string “Account $pid_18_01 contains carriage returns in at least one of the diagnosis fields. Please review and correct.
$msg
“]
mime::setheader $token Subject “Account $pid_18_01 contains carriage returns in at least one of the diagnosis fields. Please review and correct.”
smtp::sendmessage $token -servers
mime::finalize $token
}
Any ideas why this would work fine in DEV via testing tool and routing and in PROD via the testing tool but has issues when applied to a route in PROD?
Thanks in advance for your help.