Autor Beitrag
sagar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Mo 21.07.03 23:25 
Hey leute

hab ein kleines Problem: Ich will ein Programm schreiben, dass nur meine email abruft und in einem memo-feld anzeigt.

Bis jetzt hab ich folgenden code:
ausblenden Delphi-Quelltext
1:
2:
3:
idpop31.Connect;
memo1.text:=inttostr(IdPOP31.checkmessages);
idpop31.Retrieve(80,idmessage1);

also nicht sehr viel. Wie kann ich jetzt die mail im memofeld anzeigen lassen.
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: Mi 23.07.03 06:36 
Also, du musst die Message in eine idMessage Komponente speichern.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
var i:integer;
begin
idpop31.Connect();
for i :=0 to idpop31.CheckMessages do begin
idpop31.Retrieve(i,idmessage1);
memo1.Lines.Add(idmessage1.Body.Text);
end;
idpop31.Disconnect;
end;


Allerdings macht er dir jetzt Stress, wenn die E-mail im MIME Format geschrieben ist, da gibt es allerdings auch was. Achja, probieren geht über studieren und schau dir mal die Indydemos an.

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
sagar Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Mi 23.07.03 09:18 
ersteinmal danke für deine hilfe ! Aber ich habe deinen Code ausprobiert. Bei mir bleibt dort das memo1 leer.
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: Mi 23.07.03 16:44 
Du hast schon den POP3-Server, User und Passwort angeben, beim idpop31.

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
sagar Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Fr 25.07.03 00:12 
ja ich hab alles eingegeben. Er kompiliert ja auch das programm aber er zeigt wenn ich auf den button klicke nichts im memo1 an
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: Fr 25.07.03 07:59 
Schau dir mal die Indydemos an, die es auf der Homepage zum download gibt, da gibt es einen E-mail Client als Beispiel, da kannst du ja den Quelltext hernehmen.

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
sagar Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Fr 25.07.03 10:19 
wo finde ich denn dieses Demo ?
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: Fr 25.07.03 10:35 

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?