Link to home
Start Free TrialLog in
Avatar of beer9
beer9Flag for India

asked on

How to attach a file while sending email via mailx or mail?

I would like to attach a file while sending a email via a command line option in a bash script which is getting executed via cron every hour. Please let me know if there is a way to achieve this. Thanks!
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Hi,
unfortunately it is not possible to send email attachments using the command line of mail or ¤ailx.
I'd suggest using 'mutt' instead.

Wmp

Avatar of beer9

ASKER

How Can I use 'mutt' for sending email with attachment :-)
SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am not sue which uuencode you are going to use, but the one in the script is using

--base64

which might not be supported in your version
You can add 8bit also. 99% of internet is able to cope with that.
Why not let 'mutt' do the job? And it's a fine mail client compared to 'mailx', btw.
mutt for Solaris 10 -
ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/mutt-1.5.19-sol10-sparc-local.gz
 
Avatar of beer9

ASKER

Thank you :-)