Check out
MIME::Lite::HTML
-- I haven't used it (we
decided to host images on a web server instead of sending
them out with the email), but it looks like it takes
care of all this for you.
Comment on Re: How do I get an attached image to show up in HTML?