Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MAILX - email body not giving "new line"

Status
Not open for further replies.

simpson

MIS
Oct 23, 2001
58
CA
I have created a flat file from a grep | awk statement that I am passing to a mailx statement but when the email shows up it is not displaying the new line chars. I can pass the mailx statement most other files and they show up fine. i.e. /etc/hosts. When I view the file (using vi or cat) it looks okay, just shows up wrong in the email.

mailx -s "Audit" user@domain.net < $mail_file

everything is on the same line.

If anyone has any ideas I would appreciate it. thanks

 
Your mailx syntax is correct. It is something to do with the generated file at your end or with the mail handler at the other end.

Suggest you use od or similar to check the contents of the file to see what is occuring.

Are you going between GNU/Linux or UNIX and Windows or Mac environments?
 
Have you tried unix2dos?

unix2dos $mail_file | mailx -s "Audit" user@domain.net



 
Try

uuencode info.txt anotherfile.txt | mailx -s "test" name@server.com


Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top