Autor Beitrag
Fabian E.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Mi 07.03.07 19:48 
hallo!

ich habe vor mit indy eine email mit anhang zu verschicken.
de email klappt auch wunderbar nur beim anhang habe ich nicht die geringste ahnung wie das gent.
ich habe hier im forum und bei google gewisse codeschnipsel mit TidAttachment oder so gesehn...
aber nie ganze beispiele die funktioniert hätten... :(
Könnt ihr mir bitte helfen?
Danke!
katjah
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21

Win10 65bit
D7, D2005
BeitragVerfasst: Mi 07.03.07 22:08 
Hi,

hier ein Codeschnippsel, ich hoffe, es hilft Dir weiter.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
    for i:=0 to lvFiles.Items.Count - 1 do
    begin
      Attachment:=lvFiles.Items[i].Caption;
      TIdAttachment.Create(Msg.MessageParts, Attachment);
    end;
    try
      IdSMTP1.Send(msg);
    except
      on E:Sysutils.Exception do
      begin
        ShowMessage(e.message);
      end;
    end;


Zur Erklärung: lvFiles ist eine Listbox mit Dateinamen, msg ist ein TIdMessage.

_________________
Gruß Katja


Zuletzt bearbeitet von katjah am Mi 07.03.07 22:54, insgesamt 1-mal bearbeitet
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mi 07.03.07 22:42 
Psst! <span class="inlineSyntax"><span class="codecomment">{PROTECTTAG328fb2ce0d7a6027754a599ff0ebd6b0}</span></span> :les: ! ;)

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
katjah
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21

Win10 65bit
D7, D2005
BeitragVerfasst: Mi 07.03.07 22:55 
@JayEff: Danke !

_________________
Gruß Katja