![]() |
Problem beim senden mit anhang - indy 9
Hallo liebe Leute,
Ich habe das Problem dass sich bei größeren Anhängen mein Delphiprogramm beim senden aufhängt. Nach dem senden funktioniert es wieder.
Delphi-Quellcode:
Ich benutze Indy 9
if OpenDialog1.Execute then
begin attach := TidAttachment.Create(msg.MessageParts, OpenDialog1.FileName); attach.DisplayName := msg.Subject; end; smtp.AuthenticationType := atLogin; smtp.Connect; smtp.Authenticate; try smtp.Send(msg); finally showMessage('mail gesendet'); smtp.Disconnect; Ich bin sehr dankbar für schnelle gute Antworten :o |
Re: Problem beim senden mit anhang - indy 9
Ah, das hatten wir schon des öfteren in verschiedenen Variationen.
Das Problem ist, dass Indy in der Zeit, wo es mit dem Upload beschäftigt ist, den kompletten Thread in dem es läuft blockiert. Einfache Lösung: Du musst diese Aktion in einem Extra-Thread ausführen. Es gibt zwar eine Komponente TidAntiFreeze, die in meiner Erfahrung allerdings nie funktioniert hat. Mit freundlichen Grüßen, Valle PS.: Zum Thema Threads: ![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:25 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz