$Msg = new Mail::Sender ( { smtp => SMTP_IP, debug_level => 4, port => '2255', debug => '/tmp/mail_sync.log' } ); $Msg->OpenMultipart({ from => xxxx@gmail.com, to => xxxx@gmail.com, subject => testing, debug => '/tmp/log.log', multipart => 'related', }) ->Part({ctype => 'multipart/alternative'}) ->Part({ctype => 'text/html', disposition => 'NONE', msg => " xxxxx ( Some HTML Content ) " }) ->EndPart("multipart/alternative"); $Msg->Attach({ description => 'fax1 jpg', ctype => 'image/jpeg', encoding => 'base64', disposition => "attachment; filename=1111;", file => 'filename', }); $Msg->Close(); }