New to Perl - trouble with images in HTML file.

Hi,

I've never used Perl before and wish to use it for a small script. I'm
trying to e-mail a HTML file with included images to myself from a server
I've set up. I have it working but with a problem. The images appear in
the sent document in the correct places but they also appear grouped
together at the end of the document. Could someone guide me as to what
I'm doing wrong please?

Cheers,
Andy J.

The script I've got so far is:-

#!/usr/bin/perl

use MIME::Lite;
$msg = new MIME::Lite
From =>'sender [at] xxx.xxxx.net',
To =>'recipient [at] xxx.xxxx.com',
Subject =>'Report for web site.',
Type =>'multipart/mixed';

attach $msg
Type =>'text/html',
Path =>'/var/www/html/PCY-Report.html',
Filename =>'PCY-Report.html';
attach $msg
Type =>'image/png',
Path =>'/var/www/html/org.png',
Filename =>'org.png';
attach $msg
Type =>'image/png',
Path =>'/var/www/html/code.png',
Filename =>'code.png';
attach $msg
Type =>'image/png',
Path =>'/var/www/html/dir.png',
Filename =>'dir.png';
attach $msg
Type =>'image/png',
Path =>'/var/www/html/os.png',
Filename =>'os.png';
attach $msg
Type =>'image/png',
Path =>'/var/www/html/req.png',
Filename =>'req.png';
attach $msg
Type =>'image/png',
Path =>'/var/www/html/searchw.png',
Filename =>'searchw.png';
attach $msg
Type =>'image/png',
Path =>'/var/www/html/size.png',
Filename =>'size.png';
attach $msg
Type =>'image/png',
Path =>'/var/www/html/type.png',
Filename =>'type.png';

$msg->send;
Andrew Jenkins [ Sa, 11 Dezember 2004 23:42 ] [ ID #532086 ]

Re: New to Perl - trouble with images in HTML file.

"Andrew Jenkins" <andrew.jenkins [at] bigfoot.com> wrote in message
news:opsiu70lxnfabfey [at] news.dsl.pipex.com...
> Hi,
>
> I've never used Perl before and wish to use it for a small script. I'm
> trying to e-mail a HTML file with included images to myself from a server
> I've set up. I have it working but with a problem. The images appear in
> the sent document in the correct places but they also appear grouped
> together at the end of the document. Could someone guide me as to what
> I'm doing wrong please?

You are attaching the images. See the MIME::Lite postcard script for an
example of embedded images in HTML.

>
Tintin [ So, 12 Dezember 2004 10:07 ] [ ID #532524 ]
Perl » alt.perl » New to Perl - trouble with images in HTML file.

Vorheriges Thema: replace some words in special field in a line.
Nächstes Thema: The Perl Review, with cheaper subscription options