Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Re: displaying ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 10 Topic 11020 of 11982
Post > Topic >>

Re: displaying inline images in HTML email

by noreply@[EMAIL PROTECTED] (Gunnar Hjalmarsson) May 3, 2008 at 08:31 PM

David Newman wrote:
> I'm trying to include a PDF image both inline and as an attachment to an

> HTML email. The MIME::Lite module sup****ts this, and the do***entation 
> even gives an example:
> 
> http://tinyurl.com/uemf7
> 
> However, when I try this with the code below, the inline image doesn't 
> display. (The attachment is fine, though.) This is puzzling given that 
> it's basically the same code as in the example above.
> 
> I'm new to <img src=cid: > tags. I've also tried this with "<img 
> src=cid:08Bike.pdf>" but that doesn't display inline either.
> 
> How to get this working?

See my marks below. Aren't those supposed to be the same?

> #!/usr/bin/perl -w
> 
> use strict;
> use MIME::Lite;
> 
> my $msg = MIME::Lite->new(
>     To      =>'user@[EMAIL PROTECTED]
',
>     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:bike">
------------------------^^^^
>         </body> }
> );
> 
> $msg->attach(Type => 'application/pdf',
>     Id   => 'cruisin',
---------------^^^^^^^
>     Path => '/home/someuser/08Bike.pdf'
>     );
> 
> $msg->send();

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 




 10 Posts in Topic:
displaying inline images in HTML email
dnewman@[EMAIL PROTECTED]  2008-05-02 22:26:48 
Re: displaying inline images in HTML email
rob.dixon@[EMAIL PROTECTE  2008-05-03 15:44:39 
Re: displaying inline images in HTML email
Jenda@[EMAIL PROTECTED]   2008-05-03 22:42:10 
Re: displaying inline images in HTML email
dnewman@[EMAIL PROTECTED]  2008-05-04 12:12:09 
Re: displaying inline images in HTML email
dnewman@[EMAIL PROTECTED]  2008-05-03 07:04:25 
Re: displaying inline images in HTML email
chas.owens@[EMAIL PROTECT  2008-05-03 04:42:25 
Re: displaying inline images in HTML email
noreply@[EMAIL PROTECTED]  2008-05-03 15:40:02 
Re: displaying inline images in HTML email
noreply@[EMAIL PROTECTED]  2008-05-03 20:31:43 
Re: displaying inline images in HTML email
chas.owens@[EMAIL PROTECT  2008-05-03 16:46:55 
Re: displaying inline images in HTML email
chas.owens@[EMAIL PROTECT  2008-05-03 16:55:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 15:06:03 CDT 2008.