Operating System - HP-UX
1833053 Members
2526 Online
110049 Solutions
New Discussion

Re: doubt in mailx option

 
SOLVED
Go to solution
Nirmalkumar
Frequent Advisor

doubt in mailx option

Hi all,

what is the syntax for attachment ,cc & bcc in mailx option...

Help apperciated...

Thanks,
Nirmal.

5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: question on mailx option

mailx doesn't do attachments. You must uuencode or shar(1) up the text.

To get add CC, you can use ~h to edit the 4 headers. Or use ~c name or ~b name to add to what is there.

Arturo Galbiati
Esteemed Contributor

Re: doubt in mailx option

Hi Nirmal,
I suggest you to use mail instead.
Read man mail for further info and options.
HTH,
Art
Yogeeraj_1
Honored Contributor
Solution

Re: doubt in mailx option

hi Nirmal,

one simple example for sending a mail with an attachment is:

/usr/bin/uuencode $logfile "Reports Server cache-deleted.lis"|mailx -m -s "Your subject on $(date)" $emailadd1

where emailadd1 and logfile are environment variables pointing to valid values.

hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Nirmalkumar
Frequent Advisor

Re: doubt in mailx option

Hi all,

Thanks for reply..


Thanks,
Nirmal.


Dennis Handly
Acclaimed Contributor

Re: question on mailx option

>Art: I suggest you to use mail instead.

Why would you ever want to use mail(1) instead of mailx(1)?