Operating System - HP-UX
1830327 Members
2187 Online
110001 Solutions
New Discussion

Re: what options to be used in mail command

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

what options to be used in mail command

Hi

I want to send a mail using "mail" command from HP-UX.

In linux normally i use follwoing sytax to send a mail

# mail -s "subject" mailaddress

Ex:

# mail -s "hai" senthil@hp.com

explanation:

-s ==> to mention the subject

other important options

-a ==> to mention the attachment file name
-c ==> to mention the mail id that will be in CC
-b ==> to mention the mail id that will be in BCC.

like above,

1) how you are sending mails from hp-ux using mail command.

2) what are the corresponding options used for mentioning "subject" "CC" "BCC" "attachments"

pls explain me.
6 REPLIES 6
TTr
Honored Contributor
Solution

Re: what options to be used in mail command

Unfortunately the HP-UX mail command is very primitive command and it is not a counterpart for the Linux mail. You should use "mailx" in HP-UX to send emails in a script. But neither one of these commands can handle attachements. You can use elm and it can send/receive/view/save attachments in menu mode but I don't think you can include attachments in command line mode. You have to install a mail program that can handle attachemnts, such as pine. You could also manually wrap the attachments using uuencode, run a search for it in this forum.
T G Manikandan
Honored Contributor

Re: what options to be used in mail command

you can use mutt

http://hpux.connect.org.uk/hppd/hpux/Networking/Mail/mutt-1.5.19/

mutt -a attachment -s "subject"
T G Manikandan
Honored Contributor

Re: what options to be used in mail command

T G Manikandan
Honored Contributor

Re: what options to be used in mail command

Dennis Handly
Acclaimed Contributor

Re: what options to be used in mail command

>-s ==> to mention the subject

mailx has this.

>-c ==> in CC, -b ==> in BCC.

mailx can only do this if you are interactive and you use ~h to update the 4 header lines.
Taifur
Respected Contributor

Re: what options to be used in mail command

HI Senthil

You can check attached file.

RGds//
Taifur