次のスクリプトをMACOSXバージョンのTCLで実行しましたが、正常に動作しましたが、Windows7マシンのActiveStateTCLでハングします。
proc send_simple_message {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 \
-ports 587 \
-debug 1\
-username myAccount@gmail.com \
-password myPassword \
-recipients $recipient -servers $email_server
mime::finalize $token
}
send_simple_message myAccount@gmail.com smtp.gmail.com \
"This is the subject." "This is the message."
Activestateシステムで何が間違っている可能性があるかについてのアイデアはありますか?(これはActivestateの新規インストールであり、数日前にダウンロードしました。)
更新:企業のファイアウォールが原因でフリーズしたと思います(それについては誰かに相談する必要があります)。ただし、企業のネットワークを経由しない場合はさらに遠くまで行くことができますが、それでもメッセージは配信されません。次のデバッグ情報が返されます。
Trying smtp.gmail.com...
<-- 220 mx.google.com ESMTP d8sm8712528ibl.1
--> EHLO ush10900dv (wait upto 300 seconds)
<-- 250-mx.google.com at your service, [32.178.65.125]
<-- 250-SIZE 35882577
<-- 250-8BITMIME
<-- 250-STARTTLS
<-- 250 ENHANCEDSTATUSCODES
--> STARTTLS (wait upto 300 seconds)
<-- 220 2.0.0 Ready to start TLS
--> EHLO ush10900dv (wait upto 300 seconds)
<-- 250-mx.google.com at your service, [32.178.65.125]
<-- 250-SIZE 35882577
<-- 250-8BITMIME
<-- 250-AUTH LOGIN PLAIN XOAUTH
<-- 250 ENHANCEDSTATUSCODES
--> MAIL FROM:<peddy@ush10900dv> SIZE=245 (wait upto 600 seconds)
<-- 530-5.5.1 Authentication Required. Learn more at
<-- 530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 d8sm8712528ibl.1
--> RSET (wait upto 0 seconds)
--> QUIT (wait upto 0 seconds)
handshake failed: resource temporarily unavailable
while executing
"::tls::handshake $state(sd)"
invoked from within
"smtp::sendmessage $token -ports 587 -debug 1 -username username@gmail.com
スクリプトはMacOSマシンとWindows/Activestateマシンの両方で同じクレデンシャルを使用していますが、認証に失敗しているようです。他にアイデアはありますか?