These are chat archives for IndySockets/Indy

19th
Dec 2017
Renanbg
@Renanbg
Dec 19 2017 10:06
Hello Guys. I just updated my indy to 10.6.20 in Delphi 7 and I'm having troubles to send an e-mail whith plain text and html text. The plain text do not show up in the message, just the html text. I'm using this code:
with TIdMessageBuilderHtml.Create do
try
  // optional...
  PlainText.Text := 'Texto aparece aqui .';
  PlainTextCharSet := 'utf-8';

  Html.Text := '<html><body>html aparece aqui<p><img src="cid:us"></body></html>';
  HtmlCharSet := 'utf-8';
  HtmlFiles.Add('D:\us.jpg', 'us');

  FillMessage(email); //ou idmessage
finally
  Free;
end;
Remy Lebeau
@rlebeau
Dec 19 2017 19:25
@Renanbg it is normal behavior for an email reader that understands MIME to display the HTML and hide the plain text. Or are you having a different problem? The code you showed is fine