New to Perl - trouble with images in HTML file.
am 11.12.2004 23:42:11 von Andrew JenkinsHi,
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@xxx.xxxx.net',
To =>'recipient@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;