unable to put cc list in mailx


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting unable to put cc list in mailx
# 1  
Old 03-04-2010
unable to put cc list in mailx

Hi,

I am using mailx command to send mail.

But unable to use -c option to send mails by cc list.

eg.
..mailx -s "subject" -c "CCLIST" "TOLIST"

Its showing " illegal option -- c"

I am using HP UX.

Can anybody help me out.

Thanks in advance..!
# 2  
Old 03-04-2010
Try this,


Code:
mailx -s "subject" <to-addr> -c <cc-addr>

cc-addr should be a comma separated list of names.

# 3  
Old 03-04-2010
Good thing people read the man pages of a command before complaining. Because nowhere in the HP-UX mailx page it states anything about supporting a -c switch. And it isn't in the POSIX page either (mailx). Only (Open)Solaris, the *BSDs, and Linux support it.

One way would be to use mailx commands in your message, eg. put something like this into a file
Code:
~c carboncopy@example.com
~b blindcarboncopy@example.com

Hi!

This is a test

and pipe it into mailx:
Code:
mailx -s 'Subject' recipient@example.com < file

# 4  
Old 03-04-2010
Quote:
Originally Posted by pludi
Good thing people read the man pages of a command before complaining. Because nowhere in the HP-UX mailx page it states anything about supporting a -c switch. And it isn't in the POSIX page either (mailx). Only (Open)Solaris, the *BSDs, and Linux support it.

One way would be to use mailx commands in your message, eg. put something like this into a file
Code:
~c carboncopy@example.com
~b blindcarboncopy@example.com

Hi!

This is a test

and pipe it into mailx:
Code:
mailx -s 'Subject' recipient@example.com < file


Hi,

Thanks alot.....!!Its working...!!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unable to send attachment using mailx command

I am unable to send email with attachment using the mailx command. Without the attachment, the email goes through file. This is the command I use. Works : $ echo "Test" | mailx -s "Test" username@website.com Fails : $echo "Test" | mailx -a all-dss-accounts.txt -s "Test"... (3 Replies)
Discussion started by: nkarthik_mnnit
3 Replies

2. Shell Programming and Scripting

[Solved] Unable to mailx new $pid for a script restart

Ill try to make this brief: I am trying to get the script below to run another script defined as BATNAM. The script runs fine, does what i designed it to do, however... I would like it to mailx the NEW $pid that was restarted. This script is supposed to go in crontab as root, and run by... (8 Replies)
Discussion started by: olyanderson
8 Replies

3. Solaris

Unable to send mail through mailx

Hi, I am using solaris 5.9 OS and I am facing an issues with mailx. My SMTP port is configured to listen 6190 and not the default one which is 25. I can send mail to my inbox when i do it manually through the following steps root@<dbname> # telnet 15.12.88.10 6190 Trying 15.12.88.10...... (0 Replies)
Discussion started by: Srinathkiru
0 Replies

4. Linux

mailx: Unable to send Japanese

Hi All, I am facing problem in sending Japanese characters using mailx command in GNU linux machine. The mail is going with junk characters like "メールの-界へようこそ". I tried changing the LANG value to japan locale off UTF-8. But it doesn't worked. I have to send the data as body not as an... (0 Replies)
Discussion started by: Karteek
0 Replies

5. Shell Programming and Scripting

HPUX mailx CC list

I want to use CC(Carbon Copy) in mail list using HP-UX I am using the command : echo "hello" |mailx -m -s"subject" -c "CC_LIST" "TO_LIST" but I am getting an error -c illegal option...I tried with the solution from forums but no luck... (12 Replies)
Discussion started by: gautamadak
12 Replies

6. Shell Programming and Scripting

Unable to attache file in mailx

I have script to send report to the recipent along with a short decription of a message. But unfortunatly it fails to deliver the report as attachment nothing apart from the message come, please find the part where I am getting stuck and confused ... please check out if you have any better... (1 Reply)
Discussion started by: nicknihal
1 Replies

7. UNIX for Dummies Questions & Answers

Unable to send e-mail using mailx command

Hi All, Can you please help me in solving this. I am facing some problem sending mails. If I use like this, I am able to send mail the mail echo "This is an automated e-mail; please do not reply." | mailx -s "Good Morning ." 'abc@xys.com' But if I use like this, then I am unable to send... (1 Reply)
Discussion started by: manas6
1 Replies

8. UNIX for Advanced & Expert Users

unable to sent mail in html format by mailx command.

I use maix command to sent mails. i can sent only plain text mails. Unable to sent mails in html format. while sending mails in html format, the received mail has the html code only. (17 Replies)
Discussion started by: p_prathaban
17 Replies

9. Shell Programming and Scripting

UNABLE to send 5MB attachment using mailx

hi, i've created a script that sends out an email using the mailx and uuencode command. the script is ok, but when a 5MB attachment is sent, there are time that the intended recepients does not receive any email. i tested it and the issue is intermitent. please help on how to troubleshoot. i... (3 Replies)
Discussion started by: tads98
3 Replies

10. Shell Programming and Scripting

unable to do mailx from shell script

Hi From within a shell script my mailx doesnt seem to work...can somebody tell me what is wrong... #!/bin/ksh #Script to verify wheather all databases listed are up and running #Script works with Oracle8 and above databases #Script has to be run by ./scriptname DBA=xiamin@unix.com echo... (3 Replies)
Discussion started by: xiamin
3 Replies
Login or Register to Ask a Question