Windows XP でインライン イメージを含む電子メールを送信しようとすると、「SMTP 受信データ タイムアウト」というエラーが表示されます。インライン イメージを含む電子メールを送信するために、次のコードで Indy 10 の tiburon ブランチを使用しています。
MB := TIdMessageBuilderHtml.Create;
try
MB.PlainText.Assign(Text);
MB.Html.Assign(FHTML);
MB.HtmlFiles.Add('c:\Path\to\My\Image.jpg');
MB.FillMessage(IdMessage);
finally
MB.Free;
end;
if not IdSMTP.Connected then
IdSMTP.Connect;
IdSMTP.Send(IdMessage);
これは Windows XP で発生し、Windows Vista では電子メールとインライン イメージが問題なく送信されます。
どうやらサーバーに何も送信していないようで、送信前に画像のエンコードでスタックしているようです。
コールスタックは次のとおりです。
IdReplySMTP 497 +1 TIdReplySMTP.RaiseReplyError
IdTCPConnection 574 +1 TIdTCPConnection.RaiseExceptionForLastCmdResult
IdTCPConnection 724 +10 TIdTCPConnection.CheckResponse
IdTCPConnection 563 +2 TIdTCPConnection.GetResponse
IdTCPConnection 583 +4 TIdTCPConnection.SendCmd
IdTCPConnection 696 +4 TIdTCPConnection.SendCmd
IdSMTP 377 +2 TIdSMTP.DisconnectNotifyPeer
IdTCPConnection 517 +5 TIdTCPConnection.Disconnect
IdSMTP 476 +2 TIdSMTP.Disconnect
IdTCPConnection 828 +2 TIdTCPConnection.Disconnect
Email 130 +11 TEmail.Destroy
System 9806 +1 TObject.Free
EnviarEmail 322 +38 TFormEnviarEmail.Enviar
System 12106 +38 @HandleFinally
RtlUnwind
System 11589 +83 @HandleAnyException
KiUserExceptionDispatcher
RtlAppendUnicodeToString
IdMessageClient 873 +4 EncodeAttachment
IdMessageClient 1213 +252 TIdMessageClient.SendBody
IdMessageClient 1244 +283 TIdMessageClient.SendBody
IdMessageClient 1269 +12 TIdMessageClient.SendMsg
IdSMTPBase 251 +6 TIdSMTPBase.SendNoPipelining
IdSMTPBase 436 +4 TIdSMTPBase.InternalSend
IdSMTPBase 457 +1 TIdSMTPBase.Send
IdSMTP 415 +6 TIdSMTP.Send
IdSMTPBase 449 +6 TIdSMTPBase.Send
何が原因で、どうすれば問題を解決できますか?
ありがとう。