On Fri, 2004-07-23 at 08:07, Murray Taylor wrote: > This works with winblows - I use it in production here > > cat file | uuencode tgt_filname | mail -s "subject" [EMAIL PROTECTED] > ^ ^ > | +--- attachment FILENAME for the target host to > use > +--- attachment CONTENT from the source host >
May I suggest an alternative - /usr/ports/mail/p5-Mail-Sender Install this perl module and then you can easily write a simple script to handle your attachments. Something like the following: #!/usr/local/bin/perl -w use Mail::Sender; $to = $ARGV [0]; $replyto = "[EMAIL PROTECTED]"; $subject = $ARGV [1]; $file = $ARGV [2]; $mesg = $ARGV [3]; $from = "[EMAIL PROTECTED]"; if (! $file ) { PrintUsage(); die "\n"; } else { $sender = new Mail::Sender {smtp => 'your.smtp.server.ip', from => $from}; $sender->MailFile({ to => $to, replyto => $replyto, subject => $subject, msg => $mesg, file => $file}); print "The file $file has been sent to $to\n"; }; sub PrintUsage { print "Usage: mailfile.pl <To> <Subject> <File> <Message>"; }; Not tested but should work, just alter to suit your needs. Regards, -- Nelis Lamprecht PGP: http://www.8ball.co.za/pgpkey/nelis.asc "Unix IS user friendly.. It's just selective about who its friends are."
signature.asc
Description: This is a digitally signed message part