List Info

Thread: What is the simplest way to use command line(mailorsendmail) with an attachment?




What is the simplest way to use command line(mailorsendmail) with an attachment?
user name
2006-03-30 22:04:45
 
The other suggestion, to use the Perl MIME packages, would probably be better in the
long run. ;
 
I'm not sure, but I think the use of a uuencoded file as a MIME hunk, is kind of a
quasi hack.  But it has worked for me almost everywhere I've tried it. 
 
I think I did have problems getting GroupWise to accept it though, maybe other
email clients would also object.
 
Chris
 
-----Original Message-----
From: rhn-users-bouncesredhat.com [mailto:rhn-users-bouncesredhat.com]On Behalf Of Bill Watson
Sent: Wednesday, March 29, 2006 5:19 PM
To: 'Red Hat Network Users List'
Subject: RE: [rhn-users] What is the simplest way to use command line(mailorsendmail) with an attachment?

I tried:
uuencode pdf/300.pdf page300.pdf|mailx -s "This is the subject for page 300" magicdigits.com">billmagicdigits.com
 
and life is good! A couple of hiccups in that the 2nd parameter on uuencode (name of file) will add .dat if you do not specify the extension. WinXP doesn't deal with that so well. Also having the file to attach actually exist (where you say it does) ;helps.
 
Thanks for your help, this is the good stuff that manuals often forget to cover!
Bill Watson
-----Original Message-----
From: rhn-users-bouncesredhat.com [mailto:rhn-users-bouncesredhat.com] On Behalf Of Howard, Chris
Sent: Wednesday, March 29, 2006 3:22 PM
To: Red Hat Network Users List
Subject: RE: [rhn-users] What is the simplest way to use command line (mailorsendmail) with an attachment?

One way to do it:
 
uuencode filename.txt  filename.txt | mailx -s"here is that file" ; mail.address">otherguymail.address
 
 
Most email clients will show filename.txt as an attachment.
 
Chris
 
-----Original Message-----
From: rhn-users-bouncesredhat.com [mailto:rhn-users-bouncesredhat.com]On Behalf Of Bill Watson
Sent: Wednesday, March 29, 2006 4:07 PM
To: 'Red Hat Network Users List'
Subject: [rhn-users] What is the simplest way to use command line (mail orsendmail) with an attachment?

I have read the sendmail documents that I could find and can only conclude that I am clueless or that attachments on emails are beyond diffilcult.
 
Is there a tool laying around that can properly package an email attachment onto an email and send it via a command line protocol?
 
Thanks in advance!
Bill Watson
 
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )