Autor Beitrag
superchatti
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 296

Win XP, Red Hat Linux 7.3
Delphi 6 PE
BeitragVerfasst: So 20.04.03 11:44 
Also ich arbeite an einem E-Mail CLient!
Und wenn ich die Nachrichten abrufe zeigt der mir die im TListView an, aber wenn ich dann drauf klicke damit er sie mir anzeigt, dann zeigt der die nur an wenn ein Anhang dabei ist!
Aber wenn kein Anhang dabei ist dann hat man Pech dann zeigt er es nicht an hier der Code den ich benutze:

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
var
   stTemp: string;
   intIndex: Integer;
   li: TListItem;
begin
   stTemp := Statusbar1.Panels[1].text;
   if lvHeaders.Selected = nil then
      begin
         Exit;
      end;
   //initialise
   Showbusy(true);
   Msg.Clear;
   Memo1.Clear;
   lvMessageParts.Items.Clear;
   Panel5.visible := false;

   //get message and put into MSG
   ShowStatus('Lade Nachricht "' + lvHeaders.Selected.SubItems.Strings[3] + '"');
   POP.Retrieve(lvHeaders.Selected.Index + 1, Msg);
   statusbar1.Panels[0].text := lvHeaders.Selected.SubItems.Strings[3];
   //Setup attachments list
   ShowStatus('Dekodiere Anlage (' + IntToStr(Msg.MessageParts.Count) + ')');
   Memo1.Lines.AddStrings(TIdText(Msg.MessageParts.Items[intIndex]).Body);
   for intIndex := 0 to Pred(Msg.MessageParts.Count) do
      begin
         if (Msg.MessageParts.Items[intIndex] is TIdAttachment) then
            begin //general attachment
               Panel5.visible := true;
               li := lvMessageParts.Items.Add;
               li.ImageIndex := 5;
               li.Caption := TIdAttachment(Msg.MessageParts.Items[intIndex]).Filename;
               li.SubItems.Add(TIdAttachment(Msg.MessageParts.Items[intIndex]).ContentType);
            end;
            Memo1.Lines.AddStrings(TIdText(Msg.MessageParts.Items[intIndex]).Body);
            end;
   ShowStatus(stTemp);
   Showbusy(false);


Showbusy und so hab ich konfiguriert!
Showbusy ändert den Cursor nach HourGlass
und ShowStatus wechselt den Status der Statusbar!

Vielen Dank im voraus!

Moderiert von user profile iconKlabautermann: Code-Tags hizugefügt
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Do 24.04.03 10:53 
Ich hab mal sowas in der Art geschrieben, weílmir langweilig war. Soll ich dir das schicken?
superchatti Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 296

Win XP, Red Hat Linux 7.3
Delphi 6 PE
BeitragVerfasst: Do 24.04.03 11:04 
Jop!
Mach mal!

_________________
mfG Superchatti
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Do 24.04.03 11:06 
Wäre nett wenn ich deine Email hätte.
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Do 24.04.03 11:07 
Oh, hat sich erledigt, hab die PN bekommen.
superchatti Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 296

Win XP, Red Hat Linux 7.3
Delphi 6 PE
BeitragVerfasst: Do 24.04.03 11:08 
Wie hat sich erledigt??

_________________
mfG Superchatti
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Do 24.04.03 11:10 
Hab deine Email-Addi per PN bekommen. Das meine ich mti erledigt. :lol:

Ich mein damit nicht dass ich es doch lass. :!:
Marlno
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 75



BeitragVerfasst: Mo 26.01.04 20:39 
Titel: hmmm
so vor lauter langeweile stöbere ich mal wieder alte threads durch
leider muss ich bei sehr vielen älteren artikeln immer wieder feststellen das es meist zu einer lösung kam jedoch hier nicht aufgeführt ist.

ich würde ja gerne auch um mich etwas mit der zeit rumzuschlagen weiß eure lösungen anschauen
wäre doch nett für andere wenn die lösungen auf einem webspace account zum download bereitstehen würden oder hier gepostet werden.

liebe mit delphianer bitte fasst diese antwort bitte nicht als beleidigung oder kritik an ich hatte einfach nur sozusagen die schnauze voll immer wieder lesen zu müssen habs per mail versand. auch wenn sie denn älter waren.

hoffe man kann dies irgendwie in zukunft ändern oder im nachinein eine andere lösung zu finden.

vielen dank

gruß Marlno
:roll:
KWolf
Hält's aus hier
Beiträge: 6

WinXP
D2, D3,D4,D5,D7 alle Prof
BeitragVerfasst: Mo 26.01.04 23:32 
Titel: Habe genau das selbe Problem
Hi,

Sorry habe genau das selbe Problem. Verschicke mit Outlook Express eine Nachricht, die ich mit dem Indy-Beispielprogramm anschließend downloaden will. Der Header wird auch richtig angezeigt, doch beim Doppelklick erscheint die Nachricht nicht im Body. Lediglich, wenn ich in Outlook Express die Nachricht im HTML-Format schicke erhalte ich den Body, aber leider ebenfalls im HTML-Format, ich sehe also alle HTML-Tags.

Hier der Code
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
   //jetzt den Anhang überprüfen
   //Anhang kann entweder ein Attachment sein oder ein Body
   for i:=0 to Pred(IdMsgGet.MessageParts.Count)do
   begin
      if (IdMsgGet.MessageParts.Items[i] is TIdAttachment)then
      begin
         pnlAttachments.visible := true;
         li:=lvMessageParts.Items.Add;
         li.ImageIndex := 8;
         li.Caption := TIdAttachment(IdMsgGet.MessageParts.Items[i]).Filename;
         li.SubItems.Add(TIdAttachment(IdMsgGet.MessageParts.Items[i]).ContentType);
      end
      else if IdMsgGet.MessageParts.Items[i] is TidText then
      begin
         Memo1.Lines.Clear;
         Memo1.Lines.AddStrings(TIdText(IdMsgGet.MessageParts.Items[i]).Body);
      end;
   end;


Soweit der Quellcode von Indy, den ich übernommen habe. Kannst Du mir Helfen?

for i:=0 to Pred(IdMsgGet.MessageParts.Count)do ergibt immer 0, außer, wenn ich die Nachricht im HTML-Format schicken.


vielen Dank

Klaus

Moderiert von user profile iconUGrohne: Delphi-Tags hinzugefügt