#!/usr/bin/perl -w use strict; use warnings; use Mail::Sender; my $sender = new Mail::Sender {smtp => 'localhost'}; $sender->OpenMultipart({ from => 'marketing@mydomain.foo', to => 'marketlist@mydomain.foo', subject => 'we are so great!', type => 'multipart/related' }); $sender->Attach({ description => 'html body', ctype => 'text/html; charset=us-ascii', encoding => '7bit', disposition => 'NONE', file => 'mes.html' }); $sender->Attach({ description => 'vici gif', ctype => 'image/gif', encoding => 'base64', disposition => "inline; filename=\"VICI.gif\";\r\nContent-ID: ", file => 'VICI.gif' }); $sender->Close;