The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem while sending message and attachment with mailx nihar.dutta Shell Programming and Scripting 2 08-09-2007 11:15 AM
Mailx problem FredSmith UNIX for Dummies Questions & Answers 5 07-12-2007 08:10 AM
Problem with mailx command when sending attachment. miltony Shell Programming and Scripting 2 12-02-2005 12:43 PM
mailx problem djbartkow UNIX for Dummies Questions & Answers 1 06-27-2005 04:11 PM
mailx problem iastorms UNIX for Dummies Questions & Answers 2 05-11-2005 12:53 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-01-2006
shriashishpatil shriashishpatil is offline
Registered User
  
 

Join Date: Dec 2005
Location: Pune
Posts: 81
problem with mailx

Hi unix lovers,

I have some problem with using mailx. I want to send mail as per the instructions in a file. The mail does not reach to CC recepients.

To get a clearer picture, this is what I am typing on unix prompt.

$
$ mailx ashishp@suntech.com < mail.txt
$

And my mail.txt looks as below

$ cat mail.txt
~s testing
~c 'vganta@suntech.com,ajaygo@suntech.com'
This is just testing
$

I am using solaris.
$ uname -a
SunOS snvi003 5.8 Generic_117350-20 sun4u sparc SUNW,Sun-Fire-V240
$

I have checked with the man pages but could not find any useful info.

Any pointers would help.

thanks in advance..

-Ashish
  #2 (permalink)  
Old 03-01-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,952
to send mail to 'CC' receipients

mailx -c "<CC_address>" -s "<subject>" "<TO_Address>" < contents

this info is available in man mailx
  #3 (permalink)  
Old 03-01-2006
shriashishpatil shriashishpatil is offline
Registered User
  
 

Join Date: Dec 2005
Location: Pune
Posts: 81
Matrixmadan,

thanks for the reply. But the option -c and -s work properly when I give the CC list in the command line itself.
This is not true in my case. I have written the subject, CC list and contents in a file. If I use -s and -c in the file I get the mail as below

"
-s testing
-c 'vganta@sunteh.com,ajaygo@suntech.com'
This is just testing
"

i.e. I receive the cc list and the subject in the mail itself. The mail does not reach to CC recepients. If i use ~s and ~c in the file, subject line work properly. If there is one mail id in CC list it work properly. But if i use more mail ids in CC list no CC recepient get the mail.

Please advice how to get it worked.

-Ashish
  #4 (permalink)  
Old 03-01-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,952
i am sorry, still not clear with your problem

could you please give the file contents
and the command that you had tried,

that would help to easily analyze!
  #5 (permalink)  
Old 03-02-2006
shriashishpatil shriashishpatil is offline
Registered User
  
 

Join Date: Dec 2005
Location: Pune
Posts: 81
Matrixmadhan,

I am not able to send mail to CC recepients when there are multiple mail ids in CC list.
This is what I entered on unix prompt.

$ mailx ashishp@suntech.com < mail.txt


And my mail.txt looks as below

$ cat mail.txt
~s testing
~c 'vganta@suntech.com,ajaygo@suntech.com'
This is just testing
$


Note that ~s and ~c are part of my file above. Above I have used cat command to see the file.

Hope my question is clear.

-Ashish
  #6 (permalink)  
Old 03-02-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,952
having multiple receipients in CC,

use the following format,

Code:
mailx -c "`cat ccfile`" -s "sub" "RECEIPIENT_ID" < text
have the cc receipients list in cc file

>cat ccfile
abc@xyz.com
uvw@sdh.com
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0