Create HTML email with embedded images in Delphi

Does anyone know a good example of creating HTML email with inline images and alternative text? I need to create some tabular reports in HTML and embed logos and other images.

I believe Indy can do this with some work, but I was hoping someone could point me to a good example as a starting point. I am open to using non-Indy libraries and commercially available solutions. Quality and lead time are more important than cost. The solution should also support SMTP-based delivery to the mail exchanger.

Another item on my wishlist is the ability to use FastReports, TRichView, or a similar tool to create HTML message content. HTML output filters are available for both, but I was not able to do any testing. Any feedback on this will be appreciated.

Thanks in advance!

David

+5
source share
5 answers

Read the following articles on the Indy website:

HTML Messages
New Builder HTML Message Class

+9
source

I currently use the Clever Component email client, although not free.

TurboPower Internet (OpenSource) controls have worked great for me in the past.

+1
function data64(const filename:string): ansistring;
// uses Classes, IdGlobalProtocols, EncdDecd;
const
  crlf = #13#10;
begin
  result := '';
  with TIdMimeTable.Create do
  try
    result := 'data:'
      + GetFileMIMEType(filename) + ';';
  finally
    Free;
  end;
  with TMemoryStream.Create do
  try
    LoadFromFile(filename);
    result := result + 'base64,' + crlf
      + EncodeBase64(Memory,Size);
  finally
    Free;
  end;
end;
+1

Indy cid: : https://forums.codegear.com/thread.jspa?threadID=17473

, , , Outlook, Thunderbird , Outlook Express, , .. ..).

.NET, AspNetEmail, .

-

0

, . , Delphi, SMTP/Mime, , , , .

Jacob Palme , . , , , MIME, , . , .

, , : , , . Delphi, , , , .

0
source

All Articles