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: Do 31.07.03 14:37 
Ich benutze die Indy Komponenten und wie man überprüft ob eine Anlage dran ist und ob es Text ist!
Wie man das macht weiß ich, aber wie überprüfe ich ob die Nachricht HTML ist?
Text geht ja mit: TIdText aber HTML kann man nicht mit TIdHTML überprüfen ;-)

Kann mir jemand helfen??

_________________
mfG Superchatti
lemming
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 470

Mac OS 10.3.1
Delphi 6 Pro, Kylix 3
BeitragVerfasst: Do 31.07.03 16:38 
Indem du checkst ob das im Plaintext vorkommt:


ausblenden Quelltext
1:
Content-type: text/html					


Ist das der Fall, dann handelt es sich um HTML

Das kannst du ganz leicht mit Pos('Content-type: text/html', sMail); heraus finden[/quote]
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 31.07.03 16:45 
Also kann ich das so machen?

ausblenden Delphi-Quelltext
1:
if Pos('Content-type: text/html', sMail) = 1 then begin					


Oder wie soll ich das machen?

_________________
mfG Superchatti
lemming
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 470

Mac OS 10.3.1
Delphi 6 Pro, Kylix 3
BeitragVerfasst: Fr 01.08.03 10:40 
Richtig, genau so.

sMail steht natürlich für den Mailtext
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: Fr 01.08.03 11:21 
Wie für den MailText?
Also so
IdMessage1.Body oder was?

_________________
mfG Superchatti