Problem with mail utility on linux

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Problem with mail utility on linux
# 1  
Old 04-10-2012
Problem with mail utility on linux

Hi,

I am facing problem with "mail" utility on redhat linux.

If I use ~c in a file and use that file as imput to mail, the mail is not sent to the adrress after ~c. Instead ~c apears in the mail content itself.

Code:
$ mail a@mycompany.com < temp
$ cat temp
~c abc@mycompany.com
this is test mail
$

Now my mail content will be

Code:
~c abc@mycompany.com
this is test mail

Any help how I can use ~c using mail?
On solaris/HP I use mailx to achieve same functionality.
My sysadmin told that mailx is not availble in linux. When he installed mailx package, mail got installed.

thanks,
Ashish

Moderator's Comments:
Mod Comment Please use CODE tags instead of QUOTE tags, thanks

Last edited by zaxxon; 04-10-2012 at 06:27 AM.. Reason: quote/code
# 2  
Old 04-10-2012
you should use

Code:
mail -v user@company.com


Last edited by zaxxon; 04-10-2012 at 07:36 AM.. Reason: code tags!
# 3  
Old 04-10-2012
Some mail programs, have a special option, like -l or -~ to allow for tilde-escapes during non-interactive use. Check your man page..
# 4  
Old 04-10-2012
Code:
 
mail abc@xyz.com <<EOF
~s Subject of this email
~c abc@xyz.com
 
This is the subject
EOF

# 5  
Old 04-10-2012
This post has been hidden from public view by a moderator.

Yes he is the one we were discussing.. I made another observation here: NIS server
# 6  
Old 04-12-2012
Thanks itkamraj, scrutinizer for your reply.
However it still does not work for me.
I think my mail program is not recongizing ~s and ~c well.

In mail I am getting these characters with subject line and cc mail id as mail content.
Any pointers?

thanks
Ashish

---------- Post updated 04-12-12 at 03:42 PM ---------- Previous update was 04-11-12 at 03:54 PM ----------

The code put by itkamraj does not work for me.

Can somebody please try it on redhat linux and see it works.

I think I am missing something that my mail program is not recongnizing escape ~.
I tried setting it in .mailrc in my home directory but it didn't help.

Any help?

-Ashish
# 7  
Old 04-16-2012
Anyone, could you please help?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX mail utility

Hi, I work on a Middleware application which is installed on Windows, but its file System is on HP UNIX. I am supposed to change the SMTP host address for my application. But I am not able to find the file where the old SMTP host would have been configured/hardcoded. Can anyone assist me on this... (2 Replies)
Discussion started by: jhilmil
2 Replies

2. Shell Programming and Scripting

Mail utility not displaying escape sequences

Hello! I created a file that displays text underlined. However when I pass the file into the mail utility it doesnt display the underline. Here is the code: echo "\n\033 cat test_underline.txt mail -s "testing of underline" <email_address> < test_underline.txt Any ideas?... (8 Replies)
Discussion started by: DPERTS
8 Replies

3. Shell Programming and Scripting

Linux mail format problem

I am trying to use Linux mail command on red hat linux. It is working fine except when there is hardcoded "\n" characters in the file content i want to send. It is literally taking "\n" as text and message is not getting formatted to give newliine effect. I am using the following command: cat... (3 Replies)
Discussion started by: fundoo.code
3 Replies

4. Ubuntu

problem in linux ubuntu 10.10 about mail command

Hi, My question is that is there any substitute command for mail in ubuntu because I'm trying to run it and it is showing error: command not found!! Will it need to download any specific package? If so please tell me how can I download that pkg. Thanks in advance. (1 Reply)
Discussion started by: nageshgautam
1 Replies

5. Shell Programming and Scripting

Unix / Linux Dialog Utility - how to open 2+ more dialog windows ?

Hi, example of Unix / Linux dialog utility is below. I am going to use dialog as simple GUI for testing of a modem. So I need to combine some dialog boxes into one. I need to have input box, output box, info box, dialog box, radiobox as in any standard program with graphical user... (2 Replies)
Discussion started by: jack2
2 Replies

6. Red Hat

redhat linux mail server problem

we are using redhat linux,configured the postfix as mail server and outlook is used as mail client.whenever the user opens outlook it is start downloading all the mails from the server. Example : If a user has 50 mails in the server,whenever he opens the outlook the outlook will start... (0 Replies)
Discussion started by: ramjimh2k3
0 Replies

7. UNIX for Advanced & Expert Users

Problem with tip utility in unix

Hi , I have wrote a telnet clinet application to interact with remote system . This program takes the screen shots for every interaction and send back to us. After connecting to remote machine , i want to call tip utility to interact with a device which is connected to one remote system. Now my... (0 Replies)
Discussion started by: prasadvsda
0 Replies

8. Shell Programming and Scripting

Python+Linux: CTRL-ALT-DEL Ncurses Utility

I have this NCurses utility that prompts for user input and takes action appropriately, I changed the default action for the three finger'd salute to run this utility instead of restarting the system. This is a problem: Printing to stdout happens immediately, but before anything else (such as... (0 Replies)
Discussion started by: thmnetwork
0 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
Login or Register to Ask a Question