problem with mailx command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers problem with mailx command
# 1  
Old 01-21-2010
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 name.Please suggest how would i be able to send the sender name .

Code is like this:-

Code:
echo "<< Enter Your E-mail id >>"
read user
echo "~c abc@yahoo.com" > user_list
mailx -s "how r u" $user < user_list /*Currently using*/
mailx -s "how r u" -r xyz@yahoo.com $user < user_list  /*xyz to be sender* or required by me i.e not in script till now/

Regards

---------- Post updated 01-21-10 at 12:26 AM ---------- Previous update was 01-20-10 at 03:53 AM ----------

Guys plzz. help..:P

Last edited by pludi; 01-20-2010 at 03:59 AM.. Reason: code tags, please...
# 2  
Old 01-21-2010
Post withdrawn. Not portable at all.

Last edited by methyl; 01-21-2010 at 01:30 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Advanced & Expert Users

mailx problem

I executed my script in linux environment so Here Im facing problem.In linux has mailx command but if i include in following way Im getting error like ./script2.sh: line 6: mailx: command not found. if I use mail command also Im getting same error. $ cat script2.sh while ps | ./pwtst do... (5 Replies)
Discussion started by: ksrivani
5 Replies

3. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

4. Shell Programming and Scripting

mailx problem

Hi Experts, Just need help maybe you have some time to spare :) I am having trouble creating a working script that will scan a file and mail specific persons I need to mail 5 persons person1,person2,person3,person4,person5 Person1,person2 I need to put them in the TO: field while... (0 Replies)
Discussion started by: makaveli
0 Replies

5. 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

6. UNIX for Advanced & Expert Users

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... (2 Replies)
Discussion started by: SmithaN
2 Replies

7. UNIX for Dummies Questions & Answers

Mailx problem

I can send mail from my Sun Solaris 9 box via the mail gui no problem. If I try it from mailx command line, the mail doesn't send. What might be causing this? thanks. (5 Replies)
Discussion started by: FredSmith
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

mailx problem

Is there a size limit on the file that can be sent using mailx? I'm trying mailx -s "alertlog" tome@work < /dir/my.log and I only get a portion of the log. The newest portion of the log is not included in the mail. Additionally, I would like the option of mailing just the last 100... (1 Reply)
Discussion started by: djbartkow
1 Replies
Login or Register to Ask a Question