Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Delphi INDY 10 EMail Anhänge (https://www.delphipraxis.net/168500-indy-10-email-anhaenge.html)

Gandimann 24. Mai 2012 23:20

INDY 10 EMail Anhänge
 
Hello Freunde ,

lbattachments.Items.Clear;
attachment_list := lbattachments.Items;
if assigned( attachment_list ) then
for i := 0 to attachment_list.Count - 1 do
TIdAttachmentfile.Create( mmsg.MessageParts,attachment_list.Strings[ i ] );
mmsg.Body.Text :=frmAPPLIS.richEditEML.Text ;

so füge ich Dateianhänge dem MsgSend hinzu.
Es wird für jede EMAIL ein Attachment-Objekt erzeugt.
Hat jemand eine Ahnung wie ich vorher alle geschickte Anhänge löschen kann?

Der Hintergrund ist, Der Anwender fügt eine Datei hinzu und versendet das
Email.

Nach dem erneuten Senden enthält das Email zu den neuen Dateianhängen auch die alten.

Warum das so ist, ist mir nicht klar. :cry:

Leider finde ich keine Methode die Attachment-Objekt zu löschen.

Bin jede Hinweis dankbar .

MfG
Gandimann

System : Delphi XE / Win 7 / 64 bit

Gandimann 25. Mai 2012 00:52

AW: INDY 10 EMail Anhänge
 
Nevermind i fount the solution :

....
finally
TIDMESSAGE.MessageParts.Clear ;
end;

:thumb::thumb::thumb:


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:01 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz