Board index » delphi » TIdMessage : i want a HTML message ..

TIdMessage : i want a HTML message ..


2004-05-28 10:40:40 PM
delphi189
I've got some attachement and my mail is never in html because
in unit IdMessageClient
in methode procedure TIdMessageClient.SendBody(AMsg: TIdMEssage);
there is
else begin
if LMIMEAttachments then
begin
WriteLn('Content-Type: text/plain'); {do not localize}
WriteLn('Content-Transfer-Encoding: 7bit'); {do not localize}
WriteLn('');
WriteBodyText(AMsg);
end;
end;
WHY "Content-Type: text/plain" is written ???
Thanks.
 
 

Re:TIdMessage : i want a HTML message ..

"PliP" <XXXX@XXXXX.COM>writes
Quote
WHY "Content-Type: text/plain" is written ???
If you had followed the code logic more closely, you would have seen that
LMimeAttachments is set to true when the message's encoding is meMime. The
only way that piece of code you quoted can then execute is if the message's
TextPartCount is less than 2. When making HTML messages, you should always
have 2 text parts, one for plain text and one for HTML. Not all readers
support HTML, so they need something simplier to display.
Gambit
 

Re:TIdMessage : i want a HTML message ..

Oh thank you dear Gambit.
I saw this test. But my problem is not solved ...
Philippe (TeamBaby)
Remy Lebeau (TeamB) a écrit :
Quote
"PliP" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...


>WHY "Content-Type: text/plain" is written ???


If you had followed the code logic more closely, you would have seen that
LMimeAttachments is set to true when the message's encoding is meMime. The
only way that piece of code you quoted can then execute is if the message's
TextPartCount is less than 2. When making HTML messages, you should always
have 2 text parts, one for plain text and one for HTML. Not all readers
support HTML, so they need something simplier to display.


Gambit