• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

eg/H07-Oct-2011-7952

t/H07-Oct-2011-14,58312,781

COPYINGH A D07-Oct-20111.8 KiB4232

ChangesH A D07-Oct-20116.2 KiB171136

HTML.pmH A D07-Oct-201135.1 KiB1,243472

MANIFESTH A D06-Sep-20062.7 KiB9695

META.ymlH A D07-Oct-2011618 1918

Makefile.PLH A D30-Dec-2003614 2017

READMEH A D30-Dec-20035 KiB177119

README

1WHAT IS THIS ?
2
3This is MIME::Lite::HTML, a module which provide routine
4to transform a HTML page in a MIME::Lite mail
5
6HOW DO I INSTALL IT ?
7
8To install this module, cd to the directory that contains
9this README file and type the following:
10
11   perl Makefile.PL
12   make
13   make test
14   make install
15
16If you can't do that, you can put HTML.pm file in
17directory $root/MIME/Lite/HTML.pm and then put use lib
18$root in your program (make same thing if you haven't MIME-Lite
19module).
20So it give:
21$root/MIME/Lite/HTML.pm
22$root/MIME/Lite.pm
23
24and in your script:
25
26#!/usr/bin/perl
27use lib '/home/alian/mylibperl';
28use MIME::Lite;
29use MIME::Lite::HTML;
30
31REQUIREMENT ?
32
33libnet, MIME::Lite
34
35DOCUMENTATION ?
36
37You'll find documentation in the file HTML.pm in POD format
38See too the eg directory
39
40When you install MIME::Lite::HTML, the MakeMaker program
41will automatically install the manual pages for you
42(on Unix systems, type "man MIME::Lite::HTML").
43
44Here an extract of POD documentation:
45
46NAME
47    MIME::Lite::HTML - Provide routine to transform a HTML page in a
48    MIME-Lite mail
49
50SYNOPSIS
51      use MIME::Lite::HTML;
52
53      my $mailHTML = new MIME::Lite::HTML
54         From     => 'MIME-Lite@alianwebserver.com',
55         To       => 'alian@saturne',
56         Subject => 'Mail in HTML with images';
57
58      $MIMEmail = $mailHTML->parse('http://www.alianwebserver.com');
59      $MIMEmail->send; # or for win user : $mail->send_by_smtp('smtp.fai.com');
60
61DESCRIPTION
62    This module is a Perl mail client interface for sending message that
63    support HTML format and build them for you.. This module provide routine
64    to transform a HTML page in MIME::Lite mail. So you need this module to
65    use MIME-Lite-HTML possibilities
66
67  What's happen ?
68
69    The job done is:
70
71    *   Get the file (LWP) if needed
72
73    *   Parse page to find include images
74
75    *   Attach them to mail with adequat header if asked (default)
76
77    *   Include external CSS,Javascript file
78
79    *   Replace relative url with absolute one
80
81    *   Build the final MIME-Lite object with each part found
82
83  Usage
84
85    Did you alread see link like "Send this page to a friend" ?. With this
86    module, you can do script that to this in 3 lines.
87
88    It can be used too in a HTML newsletter. You make a classic HTML page,
89    and give just url to MIME::Lite::HTML.
90
91  Construction
92
93    MIME-Lite-HTML use a MIME-Lite object, and RFC2257 construction:
94
95    If images and text are present, construction use is:
96
97      --> multipart/alternative
98      ------> text/plain
99      ------> multipart/related
100      -------------> text/html
101      -------------> each images
102
103    If no images but text is present, this is that:
104
105      ---> multipart/alternative
106      -------> text/plain if present
107      -------> text/html
108
109    If images but no text, this is:
110
111      ---> multipart/related
112      -------> text/html
113      -------> each images
114
115    If no images and no text, this is:
116
117      ---> text/html
118
119  Documentation
120
121    Additionnal documentation can be found here:
122
123    *   MIME-lite module
124
125    *   RFC 822, RFC 1521, RFC 1522 and specially RFC 2257 (MIME
126        Encapsulation of Aggregate Documents, such as HTML)
127
128  Clients tested
129
130    HTML in mail is not full supported so this module can't work with all
131    email clients. If some client recognize HTML, they didn't support images
132    include in HTML. So in fact, they recognize multipart/relative but not
133    multipart/related.
134
135    Netscape Messager (Linux-Windows)
136        100% ok
137
138    Outlook Express (Windows)
139        100% ok
140
141    Eudora (Windows)
142        If this module just send HTML and text, (without images), 100% ok.
143
144        With images, Eudora didn't recognize multipart/related part as
145        describe in RFC 2257 even if he can read his own HTML mail. So if
146        images are present in HTML part, text and HTML part will be
147        displayed both, text part in first. Two additional headers will be
148        displayed in HTML part too in this case. Version 1.0 of this module
149        correct major problem of headers displayed with image include in
150        HTML part.
151
152    KMail (Linux)
153        If this module just send HTML and text, (without images), 100% ok.
154
155        In other case, Kmail didn't support image include in HTML. So if you
156        set in KMail "Prefer HTML to text", it display HTML with images
157        broken. Otherwise, it display text part.
158
159    Pegasus (Windows)
160        If this module just send HTML and text, (without images), 100% ok.
161
162        Pegasus didn't support images in HTML. When it find a
163        multipart/related message, it ignore it, and display text part.
164
165    If you find others mail client who support (or not support)
166    MIME-Lite-HTML module, give me some feedback ! If you want be sure that
167    your mail can be read by maximum of people, (so not only OE and
168    Netscape), don't include images in your mail, and use a text buffer too.
169    If multipart/related mail is not recognize, multipart/alternative can be
170    read by the most of mail client.
171
172
173Have fun, and let me know how it turns out!
174
175Alain BARBET
176alian@alianwebserver.com
177