Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://240230]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2024-04-16 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found