--------------060208050503030106060900
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

たむらです。
遅い時間になってしまったのでこのメールに smtp.rb を添付します。

注意点:
 蠅魍个┐討い泙擦鵝択磔瘡ぢとかだったかも知れません。
 Revision 1.2みたいです。ちなみには 1.8.5preview3では 1.69.2.3
 よって、最新までで気気譴討い襯丱阿残っていると思われます;

たむらがこれを動かしている環境は

% ruby -v
ruby 1.8.2 (2005-04-11) [i386-linux]

です。これで以下の Gmailの場合と同じパラメータで会社の smtpサーバーと
つながっています。

Hisashi Yahata wrote:
> たむらけんいち様
> 渡辺哲也様
> 
>  嬉しい情報をいただき有り難うございます。
>>  職場で SMTP over SSL用に 1.9の smtp.rbを使って 1.8系から送信してます。
> 
>>  1.9 系での Gmail の場合ですが
>>  Net::SMTP.enable_tls(nil)
>>  Net::SMTP.start(SMTP_server, 587, domain, user, password, :login) do
> |smtp|
>>  でメールを送れます。「:login」は「:plain」でも送れるようです。
> 
> なお、こちらで使用するRubyのバージョンは、
> ruby 1.8.2 (2004-11-06) [i386-mswin32]
> です。 1.9 系に更新して試してみたいと思います。


-- 
たむらけんいち<URL:http://www.rubyist.net/~tamura/d/>
Gmailしたい方、メールください(残:50)

--------------060208050503030106060900
Content-Type: text/plain;
 namemtp.rb"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filenamemtp.rb"

IyA9IG5ldC9zbXRwLnJiCiMgCiMgQ29weXJpZ2h0IChjKSAxOTk5LTIwMDMgWXVraWhpcm8g
TWF0c3Vtb3RvLgojCiMgQ29weXJpZ2h0IChjKSAxOTk5LTIwMDMgTWluZXJvIEFva2kuCiMg
CiMgV3JpdHRlbiAmIG1haW50YWluZWQgYnkgTWluZXJvIEFva2kgPGFhbWluZUBsb3ZlcnVi
eS5uZXQ+LgojCiMgRG9jdW1lbnRlZCBieSBXaWxsaWFtIFdlYmJlciBhbmQgTWluZXJvIEFv
a2kuCiMgCiMgVGhpcyBwcm9ncmFtIGlzIGZyZW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gICAgICAgICAgICAnZnJvbUBleGFtcGxlLmNvbScsCiAg
ICAjICAgICAgICAgICAgICAgICAgICAgICAgIFsnZGVzdEBleGFtcGxlLmNvbScsICdkZXN0
MkBleGFtcGxlLmNvbSddCiAgICAjICAgICBlbmQKICAgICMKICAgICMgPT09IEVycm9ycwog
ICAgIwogICAgIyBUaGlzIG1ldGhvZCBtYXkgcmFpc2U6CiAgICAjCiAgICAjICogTmV0OjpT
TVRQU2VydmVyQnVzeQogICAgIyAqIE5ldDo6U01UUFN5bnRheEVycm9yCiAgICAjICogTmV0
OjpTTVRQRmF0YWxFcnJvcgogICAgIyAqIE5ldDo6U01UUFVua25vd25FcnJvcgogICAgIyAq
IElPRXJyb3IKICAgICMgKiBUaW1lb3V0RXJyb3IKICAgICMKICAgIGRlZiBzZW5kX21lc3Nh
Z2UobXNnc3RyLCBmcm9tX2FkZHIsICp0b19hZGRycykKICAgICAgc2VuZDAoZnJvbV9hZGRy
LCB0b19hZGRycy5mbGF0dGVuKSB7CiAgICAgICAgQHNvY2tldC53cml0ZV9tZXNzYWdlIG1z
Z3N0cgogICAgICB9CiAgICBlbmQKCiAgICBhbGlhcyBzZW5kX21haWwgc2VuZF9tZXNzYWdl
CiAgICBhbGlhcyBzZW5kbWFpbCBzZW5kX21lc3NhZ2UgICAjIG9ic29sZXRlCgogICAgIwog
ICAgIyBPcGVucyBhIG1lc3NhZ2Ugd3JpdGVyIHN0cmVhbSBhbmQgZ2l2ZXMgaXQgdG8gdGhl
IGJsb2NrLgogICAgIyBUaGUgc3RyZWFtIGlzIHZhbGlkIG9ubHkgaW4gdGhlIGJsb2NrLCBh
bmQgaGFzIHRoZXNlIG1ldGhvZHM6CiAgICAjCiAgICAjIHB1dHMoc3RyID0gJycpOjogICAg
ICAgb3V0cHV0cyBTVFIgYW5kIENSIExGLgogICAgIyBwcmludChzdHIpOjogICAgICAgICAg
IG91dHB1dHMgU1RSLgogICAgIyBwcmludGYoZm10LCAqYXJncyk6OiAgIG91dH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kcikK
ICAgICAgZ2V0b2soJ01BSUwgRlJPTTo8JXM+JywgZnJvbWFkZHIpCiAgICBlbmQKCiAgICBk
ZWYgcmNwdHRvKHRvKQogICAgICBnZXRvaygnUkNQVCBUTzo8JXM+JywgdG8pCiAgICBlbmQK
CiAgICBkZWYgcXVpdAogICAgICBnZXRvaygnUVVJVCcpCiAgICBlbmQKCiAgICBkZWYgc3Rh
cnR0bHMKICAgICAgZ2V0b2soJ1NUQVJUVExTJykKICAgIGVuZAogICAgIwogICAgIyByb3cg
bGV2ZWwgbGlicmFyeQogICAgIwoKICAgIHByaXZhdGUKCiAgICBkZWYgZ2V0b2soZm10LCAq
YXJncykKICAgICAgcmVzID0gY3JpdGljYWwgewogICAgICAgIEBzb2NrZXQud3JpdGVsaW5l
IHNwcmludGYoZm10LCAqYXJncykKICAgICAgICByZWN2X3Jlc3BvbnNlKCkKICAgICAgfQog
ICAgICByZXR1cm4gY2hlY2tfcmVzcG9uc2UocmVzKQogICAgZW5kCgogICAgZGVmIGdldF9y
ZXNwb25zZShmbXQsICphcmdzKQogICAgICBAc29ja2V0LndyaXRlbGluZSBzcHJpbnRmKGZt
dCwgKmFyZ3MpCiAgICAgIHJlY3ZfcmVzcG9uc2UoKQogICAgZW5kCgogICAgZGVmIHJlY3Zf
cmVzcG9uc2UKICAgICAgcmVzID0gJycKICAgICAgd2hpbGUgdHJ1ZQogICAgICAgIGxpbmUg
PSBAc29ja2V0LnJlYWRsaW5lCiAgICAgICAgcmVzIDw8IGxpbmUgPDwgIlxuIgogICAgICAg
IGJyZWFrIHVubGVzcyBsaW5lWzNdID09ID8tICAgIyAiMjEwLVBJUEVMSU5JTkciCiAgICAg
IGVuZAogICAgICByZXMKICAgIGVuZAoKICAgIGRlZiBjaGVja19yZXNwb25zZShyZXMsIGFs
bG93X2NvbnRpbnVlID0gZmFsc2UpCiAgICAgIHJldHVybiByZXMgaWYgL1xBMi8gPT09IHJl
cwogICAgICByZXR1cm4gcmVzIGlmIGFsbG93X2NvbnRpbnVlIGFuZCAvXEEzLyA9PT0gcmVz
CiAgICAgIGVyciA9IGNhc2UgcmVzCiAgICAgICAgICAgIHdoZW4gL1xBNC8gIHRoZW4gU01U
UFNlcnZlckJ1c3kKICAgICAgICAgICAgd2hlbiAvXEE1MC8gdGhlbiBTTVRQU3ludGF4RXJy
b3IKICAgICAgICAgICAgd2hlbiAvXEE1NS8gdGhlbiBTTVRQRmF0YWxFcnJvcgogICAgICAg
ICAgICBlbHNlIFNNVFBVbmtub3duRXJyb3IKICAgICAgICAgICAgZW5kCiAgICAgIHJhaXNl
IGVyciwgcmVzCiAgICBlbmQKCiAgICBkZWYgY3JpdGljYWwoJmJsb2NrKQogICAgICByZXR1
cm4gJzIwMCBkdW1teSByZXBseSBjb2RlJyBpZiBAZXJyb3Jfb2NjdXJlZAogICAgICBiZWdp
bgogICAgICAgIHJldHVybiB5aWVsZCgpCiAgICAgIHJlc2N1ZSBFeGNlcHRpb24KICAgICAg
ICBAZXJyb3Jfb2NjdXJlZCA9IHRydWUKICAgICAgICByYWlzZQogICAgICBlbmQKICAgIGVu
ZAoKICAgIGRlZiBsb2dnaW5nKG1zZykKICAgICAgQGRlYnVnX291dHB1dCA8PCBtc2cgKyAi
XG4iIGlmIEBkZWJ1Z19vdXRwdXQKICAgIGVuZAoKICBlbmQgICAjIGNsYXNzIFNNVFAKCiAg
U01UUFNlc3Npb24gPSBTTVRQCgplbmQgICAjIG1vZHVsZSBOZXQK
--------------060208050503030106060900--