Welcome to DIHtmlMimeMessage!
DIHtmlMimeMessage is a generic component to create MIME messages
from existing HTML documents, adding required attachment files automatically.
Attachments types include images (inline, background), linked StyleSheets
and Scripts. More types can be added easily, just let me know.
During execution, DIHtmlMimeMessage parses the HTML document, 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 favourite e-mail / news components.
DIHtmlMimeMessage works with any e-mail / news client. Fully functional
example projects including sources are readily available for Indy,
SakEMail, Synapse,
and tpIPro.
Features
- Scans HTML documents for message attachments.
- Full Unicode, with 70+ character encodings.
- Automatically convert HTML to ISO-8859-1 / Latin 1 character set.
- Normalize HTML white-space option.
- Resolve relative paths to locate attachment files.
- Check if files exist before attaching them.
- Modify attachment HTML links as required.
- Detect multiple references to the same file.
- Resolve names of files with the same name in different folders.
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 attachment
details to applications so they can add them to the e-mail message.
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 the buffer
size in bytes.
Supported Attachment Types
Contact
For questions and suggestions please e-mail to delphi@yunqa.de.
Copyright & License
DIHtmlMimeMessage is copyright (c) 2004-2010 Ralf Junker, The
Delphi Inspiration.
- This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
- The origin of this software must not be misrepresented, either by
explicit claim or by omission.
- Altered versions must be plainly marked as such, and must not be
misrepresented as being the original software.
- Dependency on DIHtmlParser must not be removed from this software.
|