Problem with Carbon copy (CC) option in mailx command


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Problem with Carbon copy (CC) option in mailx command
# 1  
Old 10-14-2008
Data Problem with Carbon copy (CC) option in mailx command

Hi,
I have problems with the cc option in mailx command. Just went through some of the similar threads but none provides a satisfactory explanation.
I have a script using the mailx command in the following way:
(echo `cat mailsub.txt` ; uuencode attachment.csv attachment.csv) | mailx -s "Subject`date`" -r $unm $unm -c $uno

$unm is my mail id .
I want to sent a carbon copy to the $uno mail id.
But while running this script i am getting the following error,
"can not chdir(/var/spool/mqueue): Permission denied".
Not getting any mails also.

I could see alternate options of using sendmail command etc., but here in particular I have to use the mailx command.
If somebody can help me with this it would be of help:

Thanks in advance,

Regards,
Smitha
# 2  
Old 10-14-2008
I don't have a mailx command handy that also has the -r option, so can't test out my suggestion. Typically, the recipient(s) are the last arguments on the command line. Since you say this problem occurs when you CC, try movnig the -c $uno option before the recipient $unm:

Code:
... mailx -s "Subject`date`" -r $unm -c $uno $unm

If this doesn't help, we'll dive into the permissions problem.
MrC
# 3  
Old 10-15-2008
Hi Mrc..

Thanks a lot .. This works Smilie Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

~c carbon copy in HP-UX

Hi, I am using HP-UX operating system and i am trying to send email using mailx command is given below. below command is working fine. (echo ~c 'define.d@aol.com' cat $mail_body/temp_body)| mailx -s "Hi - This is mail subject" ${to_mail} problem. i want to use cc_maillist list(put... (13 Replies)
Discussion started by: krupasindhu18
13 Replies

2. Shell Programming and Scripting

Problem in Using fgrep Command with pattern file option

Hi, i am using fgrep command with following syntax fgrep -v -f pattern_file_name file file contains few line and have the pattern which i am giving in pattern file. My Problem is : its is not giving any output. while i am using fgrep -f pattern_file_name file it is showing all... (4 Replies)
Discussion started by: emresearch
4 Replies

3. Shell Programming and Scripting

Problem with -c option in Mailx command

Hi, I am using mailx command in shell script. When i put -c option for CC , i get error message as "Unknown flag: -c" . I checked manual of mailx command and found that ~c to be used but after using ~c also it is not working. My shell is Korn. Kindly let me know what i have to do . Thanks (9 Replies)
Discussion started by: krishna_gnv
9 Replies

4. Shell Programming and Scripting

Carbon copy using mailx command in HP-UX

Can anyone give me the code to carbon copy a mail using mailx command in HP-UX. I want to put the code in shell script. (3 Replies)
Discussion started by: makauser
3 Replies

5. UNIX for Dummies Questions & Answers

problem with mailx command

Hi, I have written down a script and in that im using mailx command in Unix. Such that i have taken the reciepent that would be in "To" using read command i.e from standard input and echoed the reciepients in cc into a file .Now im not able to use the mailx -r ie which sends the sender... (1 Reply)
Discussion started by: navjotmannan
1 Replies

6. Shell Programming and Scripting

Carbon copy for a mail in mailx command

Hi, Can you please anyone say how to send a mail with carbon copy using the mailx command. i.e the recipient list should be in CC while the mail reaches them. I need the option mailx command Thanks in advance. (11 Replies)
Discussion started by: miltony
11 Replies

7. Shell Programming and Scripting

Problem with Mailx command to send mail with attachment

Hi, I am using mailx command to send a mail with attachment. It's working fine, but with attachment I am getting one extra attachment like (ATT00131.txt). I have tried to use unix2dos command also. But still I am getting the extra attachment. I am using the following code: subject="temp... (5 Replies)
Discussion started by: viswanatharv
5 Replies

8. UNIX for Dummies Questions & Answers

Postfix Problem under mailx/sendmail command

Update: Problem solved with this command: /opt/soc/bin/postfix-setup ================================ Hi, I am trying the following mailx command: sadm@edwardwi-z:/etc$ mailx ewijaya@gmail.com Subject: test foo . . EOT But it gives the following error ... (0 Replies)
Discussion started by: monkfan
0 Replies

9. Shell Programming and Scripting

Problem with mailx command when sending attachment.

Hi, I have tried to sent a mail with body and attachment. But the shell script got hanging while executing that command. The command is "(cat body;uuencode att1.csv)|mailx -s "Production Monitoring Report(Unix Side)" milton.yesusundaram@patni.com" where body is a file having a single line.... (2 Replies)
Discussion started by: miltony
2 Replies

10. UNIX for Dummies Questions & Answers

Carbon Copy to exchange user

Hello, I am trying to send a message to few users on an exchange server. I would like to put few of them as CC. When I send it to myself and CC another user, I receive the e-mail and see the other e-mail address under CC but he doesn't receive the e-mail at all. Any ideas ? I am using... (1 Reply)
Discussion started by: mclevy
1 Replies
Login or Register to Ask a Question