> Victor Duchovni a écrit : >> On Thu, Oct 09, 2008 at 03:45:04PM -0400, James wrote: >> >> >>> http://www.unix.com/how-do-i-send-email/ >>> >> >> I would download mpack(1)/munpack(1) from CMU. The code is old and >> one needs to remove a couple of spurious declarations of malloc() on >> some systems. >> >> With mpack it is easy to send MIME encoded attachments. To adjust the >> From line post-process output of "mpack -o" to create a suitable >> From: header. >> >> > > or use Perl. > > use MIME::Lite; > > my $msg = MIME::Lite->new( > From => '[EMAIL PROTECTED]', > To => '[EMAIL PROTECTED]', > Cc => '[EMAIL PROTECTED], [EMAIL PROTECTED]', > Subject => 'blah blah', > Type => 'multipart/mixed' > ); > > $msg->attach( > Type => 'TEXT', > Data => "blah blah blah blah" > ); > > $msg->attach( > Type => '|application/vnd.ms-excel|', > Path => '/path/to/foo.xls', > Filename => 'foo.xls', > Disposition => 'attachment' > ); > > $msg->send; >
Thanks to everyone who replied for all the useful suggestions. I'm going to read the links posted and possibly try the Perl suggestion first. thanks again, Chas.