chanakya has asked for the wisdom of the Perl Monks concerning the following question:
Now, for each mail entity which has an *.html file, I'd like to add an image one on top of the content (just after <body> tag) and one image at the bottom (just before </body> tag), similar to the code belowj7BCVOSY008289 j7BCVOSY008289.header j7BD5BAI008933 j7BD5BAI008933. +header contents of j7BCVOSY008289 => msg-24072-2.html sample_image.gif contents of j7BD5BAI008933 => msg-24072-3.txt msg-24072-4.html
I'm a little confused going about adding new entities to already splitted entities.$msg = MIME::Lite->new( To =>'you@yourhost.com', Subject =>'HTML with in-line images!', Type =>'multipart/related' ); $msg->attach(Type => 'text/html', Data => qq{ <body> Here's <i>my</i> image: <img src="cid:head_image.jpg"> Some content here..blah blah blah <img src="cid:bottom_image.jpg"> </body> } ); $msg->attach(Type => 'image/jpg', Id => 'head_image.jpg', Path => '/path/to/head_image.jpg', ); $msg->attach(Type => 'image/jpg', Id => 'bottom_image.jpg', Path => '/path/to/bottom_image.jpg', );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Attaching images on top/bottom of an already split mail entities
by zentara (Cardinal) on Aug 12, 2005 at 12:22 UTC |