use strict; use Mail::Sender; eval; eval { (new Mail::Sender) ->OpenMultipart({ smtp=> 'smtp.domain.com', from=>'user@domain.com', auth=>'LOGIN', authid=>'perl', authpwd=> 'password', debug=>'./perllog', to => \@mail_address, subject => 'page JUMP', multipart => 'related', }) ->Part({ctype => 'multipart/alternative'}) ->Part({ctype => 'text/html', disposition => 'NONE', msg => <<'*END*'})
image
*END* ->EndPart("multipart/alternative") ->Attach({ description => 'perl\'s jpg', ctype => 'image/jpeg', encoding => 'base64', disposition => "inline; filename=\"image.jpg\";\r\nContent-ID: ", file => 'image.jpg'}) #local_image , can't seem to replace the network_image? ->Close(); } or print "Error sending mail: $Mail::Sender::Error\n";