Tk Library Source Code

Artifact [0b6533947c]
Login

Artifact 0b6533947c7005c693d80531974c2fcb1202e1fb:

Attachment "smtp-error.txt" to ticket [1430694fff] added by guitarzar 2006-04-21 23:23:14.
---------------------------------------------- The debug dump
Trying mail.woodglenmedical.com...
<-- 220-charger.websitewelcome.com ESMTP Exim 4.52 #1 Fri, 21 Apr 2006 10:41:41 -0500 
<-- 220-We do not authorize the use of this system to transport unsolicited, 
<-- 220 and/or bulk e-mail.
--> EHLO gb5n3 (wait upto 300 seconds)
<-- 250-charger.websitewelcome.com Hello gb5n3 [24.30.106.122]
<-- 250-SIZE 52428800
<-- 250-PIPELINING
<-- 250-AUTH PLAIN LOGIN
<-- 250-STARTTLS
<-- 250 HELP
--> AUTH LOGIN (wait upto 300 seconds)
<-- 334 VXNlcm5hbWU6
--> YWVzdGhldGljcy1pbmZvQHdvb2RnbGVubWVkaWNhbC5jb20= (wait upto 300 seconds)
<-- 334 UGFzc3dvcmQ6
--> aXZjNDgy (wait upto 300 seconds)
<-- 235 Authentication succeeded
--> MAIL FROM:<[email protected]> SIZE=54813 (wait upto 600 seconds)
<-- 250 OK
--> RCPT TO:<[email protected]> (wait upto 3600 seconds)
<-- 250 Accepted
--> DATA (wait upto 300 seconds)
<-- 354 Enter message, ending with "." on a line by itself
--> RSET (wait upto 0 seconds)
--> QUIT (wait upto 0 seconds)


---------------------------------------------- The code
# $to is set from a list of email addrs

set token [ mime::initialize -canonical text/html -file $Mail(EmailBodyFile) ]
	
# Added the following per suggestion by Patt Hoyts	
set from "\"$Mail(RealName)\" <$Mail(EmailAddr)>"
mime::setheader   $token From $from
#

mime::setheader	$token Subject $Mail(Subject)
mime::setheader	$token To $to
mime::setheader	$token Date [clock format [clock seconds] -format "%a, %d %b %Y %H:%M:%S -0800"]
		
set unmailed ""
if [ catch { set unmailed [ smtp::sendmessage $token -recipients $to -servers $Mail(Server) -username $Mail(UserName) -password $Mail(PassWord) -originator "\"$Mail(RealName)\" <$Mail(EmailAddr)>" -debug 1 ] } result ] {
			
	status "Result = $unmailed ::: $result"
			
} else {
			
	status "Result = $unmailed"
			
}
		
mime::finalize    $token


---------------------------------------------- The error
Result =  ::: 400: error writing "sock1500": invalid argument