use strict; use warnings; use MIME::Lite; my $msg = MIME::Lite->new( To =>'someone@somewhere.net', Subject =>'HTML with in-line images!', Type =>'multipart/related' ); $msg->attach(Type => 'text/html', Data => qq{ Here's my image: } ); $msg->attach(Type => 'image/gif', Id => 'myimage.gif', Path => '/some/path/myimage.gif', ); $msg->send();