Mail commands


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mail commands
# 1  
Old 04-13-2015
Mail commands

Currently, I would need to keep cc a person in the email.

I am using
Code:
 hpunix

Code:
mailx -s "instance has been started now" -c Karthi@wide.com arun@wide.com < /dev/null

When I tried the above the command the email is not triggered to the user.

Can you please let me know the exact the command to send email to the cc person.
# 2  
Old 04-13-2015
Hi Rankumar,

As per man mailx
Quote:
-c cc-addr Send carbon copies to cc-addr list of users. The cc-addr argu- ment should be a comma-separated list of names.
-c should work.

Are you getting any errors?

Does below work

Code:
echo "Simple Test" | mailx -s "Test" arun@wide.com


Last edited by ni2; 04-13-2015 at 08:59 AM.. Reason: Added simple test
# 3  
Old 04-13-2015
the option which you have provided is working for me.

-c doesn't work for me.

Not sure whether it will work in hp-ux system.
# 4  
Old 04-13-2015
I would suggest you run man mailx on your desired machine and see what it says regarding sending cc

Does below help?

HPUX mailx CC list

Last edited by ni2; 04-13-2015 at 09:07 AM.. Reason: Added link
# 5  
Old 04-13-2015
I checked & for cc it denoted to provide the ~c.

I have tried the below command, but the test2 mail is not listed in the cc list.

Code:
 mailx -s "test" test1@wide.com ~c test2@wide.com </dev/null;

# 6  
Old 04-13-2015
How about using -c instead of using the tilde ~c?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. Open Source

Shell script file movement to a Mail Box server using ftp commands

Hi All, I have a current Process that runs "windows script " for the file movement that needs to changed to a "DataStage Process (Using shell script )" Source :Text file is getting generated as part of Datastage Jobs processes and resides in a shared drive (Unix server) Target :ftp... (2 Replies)
Discussion started by: developer.dwh9
2 Replies

3. Shell Programming and Scripting

[Solved] Problem with mail commands & format

1. I generated a log for the script. log: abc def ghi ijk If I use general (plain text) format for mail sending, it was displaying correctly with new lines where I have. Eg: abc def ghi ijk But I tried with HTML format using the code: (8 Replies)
Discussion started by: karumudi7
8 Replies

4. AIX

HACMP: difference between 'cl' commands and 'cli' commands

Hi all, I'm new in this forum. I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli". The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory. I know that the first are called HACMP for AIX... (0 Replies)
Discussion started by: peppix
0 Replies

5. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

6. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

7. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

8. Programming

code that reads commands from the standard i/p and executes the commands

Hello all, i've written a small piece of code that will read commands from standard input and executes the commands. Its working fine and is execting the commands well. Accepting arguments too. e.g #mkdir <name of the directory> The problem is that its not letting me change the directory i.e... (4 Replies)
Discussion started by: Phrozen Smoke
4 Replies

9. UNIX for Dummies Questions & Answers

mail problem (NOT Mail or Mail.app)

When I try to use the CLI mail, I get the following error. What's wrong? Welcome to Darwin! % mail root Subject: test test . EOT % /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory Do I just need to change the... (1 Reply)
Discussion started by: chenly
1 Replies

10. UNIX for Dummies Questions & Answers

Hi plz How to configure my sendmail or mail commands???

Hi my freinds , I have RH7.2 I want to send E-mails from the prompt terminal where should I configure POP3 or SMTP also I want to access My hotmail .....I can't access it from MSN site when I write mail command in the prompt I can't send the mail hoow to send it to the root for example also... (7 Replies)
Discussion started by: atiato
7 Replies
Login or Register to Ask a Question