Board index » delphi » Email component- HTML with inline images
Mike
Delphi Developer |
Mike
Delphi Developer |
Email component- HTML with inline images2006-08-24 08:43:00 AM delphi98 I am looking for a component which builds email messages in HTML format with embedded images, i.e the image is rendered into the html which can be viewed by Browsers if the browser is set up appropriately. I have Clever Components but it treats each image as an attachment (or if it can render the image inline I can not figure out how). I have Indy 10 also but I cannot figure out how to achieve my objective. Advice appreciated. Mike H. |
Herbert Sitz
Delphi Developer |
2006-08-24 09:14:26 AM
Re:Email component- HTML with inline images
"Mike" <XXXX@XXXXX.COM>writes
QuoteI am looking for a component which builds email messages in HTML format you have image attachments, the html image tags have to refer to the images that are attached. I forget what syntax is used to do that but maybe someone in indy newsgroups can point the way. -- Herb Sitz |
Aurélien Dellieux
Delphi Developer |
2006-08-24 03:40:41 PM
Re:Email component- HTML with inline images
Hi,
you need to use Indy 10 with the following way of doing things (thanks to Gambit help) : www.indyproject.org/Sockets/Blogs/RLebeau/2005_08_17_A.en.aspx this link helped me a lot... you'll have to refer to : * HTML and related attachments and no plain-text or * Plain-text and HTML and attachments with : 1. HTML-related attachments only or 2. Related and non-related attachments so called related attachments are images present in the html message, or other types of files... i hope this will help you -- Aurélien Dellieux site perso : dellieuxa.perso.orange.fr site boulot : www.corwin.fr |
Remy Lebeau (TeamB)
Delphi Developer |
2006-08-24 03:42:24 PM
Re:Email component- HTML with inline images
"Mike" <XXXX@XXXXX.COM>writes
QuoteI have Indy 10 also but I cannot figure out how to achieve my objective. Gambit |
MikeW (Dallas)
Delphi Developer |
2006-08-24 09:52:58 PM
Re:Email component- HTML with inline images
I have found that Clever Components are about as good as they get.
Particularly at displaying inline images. I'd recommend that you carefully look at their demo called "mail client". Their documentation and lack of a newsgroup kinda sucks though but they do have pretty good demo applications for each of their components. "Mike" <XXXX@XXXXX.COM>writes QuoteI am looking for a component which builds email messages in HTML format |
Mike
Delphi Developer |
2006-08-25 04:01:10 AM
Re:Email component- HTML with inline images
Thanks to everyone. I am onto it with Clever Components now.
Mike MikeW (Dallas) writes: QuoteI have found that Clever Components are about as good as they get. |
Ralf Junker - http://www.yunqa.de/delphi/
Delphi Developer |
2006-08-25 06:46:41 PM
Re:Email component- HTML with inline images
I wrote DIHtmlMimeMessage some time ago and just figured that I'd upload it
if anybody was interested (download location follows below). DIHtmlMimeMessage is a generic component to create MIME messages from existing HTML documents, adding required attatchment files _automatically_. Attatchments types include images (inline, background), linked StyleSheets and Scripts. More types can be added easily, just let us know. During execution, DIHtmlMimeMessage parses the HTML document with the help of DIHtmlParser. It locates inline attachment files, creates Content IDs and adjusts the HTML document's links accordingly. An event is triggered for each inline file and should be used to add the appropriate MIME part to the message. After execution, you can send the message using your favorite e-mail / news components. DIHtmlMimeMessage works with any e-mail / news client. Fully functional example projects are readily available for Indy, Synapse, SakEMail and iPro. Sources are included as well. DIHtmlMimeMessage Features: * Scans HTML documents for message attatchments. * Fully Unicode, with 70+ character encodings. * Automatic HTML conversion to ISO-8859-1 / Latin 1. * Optionally normalizes HTML whitespace. * Resolves relative paths to locate attatchment files . * Checks if files exist before attatching them. * Modifies attatchment HTML links as required. * Detects multiple references to the same file. * Resolves names of files with the same name in different folders. Download: www.yunqa.de/delphi/downloads/DIHtmlMimeMessage.zip Usage: To create a MIME message from an existing HTML file requires two basic events only: TDIHtmlMimeMessage.OnAttachment This event is fired once for each file to attach. It passes all required information about the attachment to build up the e-mail file. TDIHtmlMimeMessage.OnEnd This event is called after the HTML document is fully parsed. It passes a Pointer to the Buffer of the modified HTML document, as well as its size in bytes. Supported Attatchment Types: * Inline Images * Document Background Image * Table Cell Background Images * Table Row Backgound Images * StyleSheets * Scripts * Missing others? E-Mail to XXXX@XXXXX.COM DIHtmlMimeMessage requires DIHtmlParser, available from www.yunqa.de/delphi/. Regards, Ralf Mike <XXXX@XXXXX.COM>writes: QuoteI am looking for a component which builds email messages in HTML format www.yunqa.de/delphi/ |