NAME
MIME::Lite::HTML : Provide routine to transform a HTML page in a MIME::Lite mail
SYNOPIS
use MIME::Lite;
use MIME::Lite::HTML;
my $mailHTML = new MIME::Lite::HTML
From => 'MIME-Lite@alianwebserver.com',
To => 'alian@jupiter',
Subject => 'Mail in HTML with images';
$MIMEmail = $mailHTML->parse('http://www.alianwebserver.com');
$MIMEmail->send; # or for win user : $mail->send_by_smtp('smtp.fai.com');
DESCRIPTION
This module provide routine to transform a HTML page in MIME::Lite mail. The job done is:
+ Get the file (LWP)
+ Parse page to find include images
+ Attach them to mail with adequat cid
+ Include external CSS,Javascript file
+ Replace relative url with absolute one
It can be used by example in a HTML newsletter. You make a classic HTML page, and give just url to MIME::Lite::HTML.
VERSION
$Revision: 0.3 $
METHODS
new(%hash)
Create a new instance of MIME::Lite::HTML.
%hash have this key : From, To, Subject, [Proxy], [Debug]
parse($url)
Subroutine used for created HTML mail with MIME-Lite
$url : Url to file to parse. Can be a local file.
Return the MIME::Lite part to send
include_css($gabarit,$root)
(private)
Search in HTML buffer ($gabarit) to remplace call to extern CSS file with his content. $root is original absolute url where css file will be found.
include_javascript($gabarit,$root)
(private)
Search in HTML buffer ($gabarit) to remplace call to extern javascript file with his content. $root is original absolute url where javascript file will be found.
input_image($gabarit,$root)
(private)
Search in HTML buffer ($gabarit) to remplace input form image with his cid
Return final buffer and list of MIME::Lite part
link_form($gabarit,$root)
(private)
Replace link to formulaire with absolute link
AUTHOR
Alain BARBET alian@alianwebserver.com