perllee has asked for the wisdom of the Perl Monks concerning the following question:
A mass email to all employees, users click on the picture, page jump.But,the web page of my mail system, local image cannot be inserted in the text, can only be inserted from the network.
I try to use the mail::sender,however,in my mail web page,the image from local cannot show.How to do? Can help change the code?
Thanks.
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*'}) <html><body> <A href="http://xxx/xxx" title="image"><div align=center><img align=ce +nter src="cid:img1" title="image" alt="image" /></div></A> </body></html> *END* ->EndPart("multipart/alternative") ->Attach({ description => 'perl\'s jpg', ctype => 'image/jpeg', encoding => 'base64', disposition => "inline; filename=\"image.jpg\" +;\r\nContent-ID: <img1>", file => 'image.jpg'}) #local_image , can't se +em to replace the network_image? ->Close(); } or print "Error sending mail: $Mail::Sender::Error\n";
|
|---|