http://www.perlmonks.org?node_id=289446


in reply to MIME Lite HTML with Attachments

The docs for MIME::Lite::HTML don't make this clear at all, and I had to look at the source to suss what was going on...

M::L::H *doesn't* inherit from MIME::Lite - it just uses it....but the good news is that it returns a MIME::Lite object when you call the parse method, so what you actually want is this...

my $mailHTML = new MIME::Lite::HTML From => 'Someone@anyplace.com', # etc. ; my $MIMEmail = $mailHTML->parse('http://google.com'); $MIMEmail->attach( Type =>'text/html; etc. etc); $MIMEmail->send_by_smtp('smtp-server.cfl.rr.com');
Cheers,
Ben.