in reply to sending an email using sendmail so that it looks like a webpage and not html
#!/usr/bin/perl -w # Send HTML document with inline images use strict; use MIME::Lite; # Create a new MIME Lite object my $msg = MIME::Lite->new( From =>'foo@foo123.com', To =>'whoever@wherever.com', Subject =>'Hi', Type =>'multipart/related'); # Add the body to your HTML message $msg->attach(Type => 'text/html', Data => qq{ <BODY BGCOLOR=#FFFFFF> <H2>Hi</H2> <P ALIGN="left"> This is an HTML message. </P> <P ALIGN="left"> <A HREF="http://foo123.com/">Here's a link</A>. </P> <P ALIGN="middle"> <IMG SRC="cid:2uni2.jpg"> </P> </BODY> }); # Attach the image $msg->attach(Type => 'image/jpg', Id => '2uni2.jpg', Path => '2uni2.jpg'); # Send it $msg->send();
|
|---|