1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
use strict;
use warnings;
#use Net::SMTP;
use MIME::Lite;
my $msg="";
$msg = MIME::Lite->new(
From =>'toto1@alcan.com',
To =>'toto2@alcan.com',
Cc =>'toto3@yahoo.fr, toto4@alcan.com',
Subject =>'A message with 2 parts...',
Type =>'multipart/mixed'
);
### Add parts (each "attach" has same arguments as "new"):
$msg->attach(Type =>'TEXT',
Data =>"Here's the GIF file you wanted"
);
$msg->attach(Type =>'text/plain',
Path =>'old_REF_ RAGP_get_xml.ftp',
Disposition => 'attachment'
);
### Send in the "best" way (the default is to use "sendmail"):
$msg->send;
#Filename =>'logo.gif', |
Partager