Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Sending Inline Images in e-mail with Mail::Sender (or getting them to print in Outlook)

by jlongino (Parson)
on Mar 04, 2003 at 04:04 UTC ( #240230=note: print w/ replies, xml ) Need Help??


in reply to Sending Inline Images in e-mail with Mail::Sender (or getting them to print in Outlook)

You might want to use MIME::Lite instead. Here is some code (that I also shamelessly lifted from the docs). It viewed and printed correctly using Outlook Express. I liked the module installation and 'feel' of the code better too:

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{ <body> Here's <i>my</i> image: <img src="cid:myimage.gif"> </body> } ); $msg->attach(Type => 'image/gif', Id => 'myimage.gif', Path => '/some/path/myimage.gif', ); $msg->send();
Update: It also views/prints correctly under Mozilla 1.2.1

--Jim


Comment on Re: Sending Inline Images in e-mail with Mail::Sender (or getting them to print in Outlook)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://240230]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2014-12-20 00:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls