金井です。

2009年9月30日1:04 Masahiro Kanai (CanI) <cani.m.61st / gmail.com>:
> 設定を確認して、再添付しました。

申し訳ありません。
先日、送付したパッチですが、再びfoldされていることを確認しました。
こちらのメーラーの送信済メールの項目では、foldされていなかったため、
油断していました。

あれから、様々な方法を試しましたが、どうもうまく送信できないようなので、
patchの文字列をbase64エンコードした文字列と、
パッチを載せた外部サイトのURLを送ります。

よろしくお願いいたします。

http://www.friendpaste.com/4x9n0ORQbUxewOQsvnRUcj

Ci0tLSBhcnJheS5jCShyZXZpc2lvbiAyNTA1MikKKysrIGFycmF5LmMJKHdvcmtpbmcgY2
9weSkKQEAgLTI3MDgsOCArMjcwOCw4IEBACiBzdGF0aWMgVkFMVUUKIHJiX2FyeV90aW1l
cyhWQUxVRSBhcnksIFZBTFVFIHRpbWVzKQogewotICAgIFZBTFVFIGFyeTIsIHRtcDsKLS
AgICBsb25nIGksIGxlbjsKKyAgICBWQUxVRSBhcnkyLCB0bXAsICpwdHIsICpwdHIyOwor
ICAgIGxvbmcgaSwgdCwgbGVuOwoKICAgICB0bXAgPSByYl9jaGVja19zdHJpbmdfdHlwZS
h0aW1lcyk7CiAgICAgaWYgKCFOSUxfUCh0bXApKSB7CkBAIC0yNzMyLDggKzI3MzIsMTEg
QEAKICAgICBhcnkyID0gYXJ5X25ldyhyYl9vYmpfY2xhc3MoYXJ5KSwgbGVuKTsKICAgIC
BBUllfU0VUX0xFTihhcnkyLCBsZW4pOwoKLSAgICBmb3IgKGk9MDsgaTxsZW47IGkrPVJB
UlJBWV9MRU4oYXJ5KSkgewotCU1FTUNQWShSQVJSQVlfUFRSKGFyeTIpK2ksIFJBUlJBWV
9QVFIoYXJ5KSwgVkFMVUUsIFJBUlJBWV9MRU4oYXJ5KSk7CisgICAgcHRyID0gUkFSUkFZ
X1BUUihhcnkpOworICAgIHB0cjIgPSBSQVJSQVlfUFRSKGFyeTIpOworICAgIHQgPSBSQV
JSQVlfTEVOKGFyeSk7CisgICAgZm9yIChpPTA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