Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 wandering the Monastery: (12)
As of 2015-07-30 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls