Originally posted by Barry Sheesley
I am trying to send an email from a Tcl proc whenever a certain condition exists. I found what looks like a simple example but when I run it at my location, it hangs my Tcl proc for about 5 minutes or so and then throws an error. The source I'm using to send the email is the following:
proc sendEmailMessage {recipient email_server subject body} {
package require smtp
package require mime
set token [mime::initialize -canonical text/plain -string $body]
mime::setheader $token Subject $subject
smtp::sendmessage $token -recipients $recipient
-servers
-debug 1mime::finalize $tokenreturn}This proc hangs on the smtp::sendmessage line and eventually throws the following error:Trying 10.1.5.123...<-- 220 masonsgw.masonichomespa.org GroupWise Internet Agent 6.5.4 Copyright (c) 1993-2005 Novell, Inc. All rights reserved. Ready--> EHLO MH_INTERFACE (wait upto 300 seconds) ... premature end-of-file from server ...12/12/2005 10:56:06[pd :pdtd:ERR /0:qs1_census_hl7] Tcl error:msgId = message0proc = 'filterRxCensus'args = ''result = 'masonsgw.masonichomespa.org GroupWise Internet Agent 6.5.4 Copyright (c) 1993-2005 Novell, Inc. All rights reserved. ReadyI know my IP address for the email server is correct. I was able to find a standalone Tcl proc that will send an email successfully but I can't get it to work through Quovadx. Any help is greatly appreciated.