[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to eliminate tmp files for mailx

Posted on 2002-07-25
4
Medium Priority
?
318 Views
Last Modified: 2010-04-21
I know how to use mailx, sending the contents of a file out as the email message or "Body"  

Is there anyway I can do this without using the tmp files and in a way similar to how the "subject" line is populated?

Ideal example (let x be the body option for illustration):

mailx -s "Subject Line" -x "Body or email message" mailusers@unixmail.com

Thanks!
0
Comment
Question by:Randy2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:bira
ID: 7178754
echo "Body or message"|mailx mailusers@unixmail.com
-s"subject Line"
0
 

Author Comment

by:Randy2001
ID: 7179987
bira,

That works! Thanks! I am going to accept your answer but before that could you tell me if its possible to add a message like you told me and then add the contents of a file.  

The email message (body) would look like this:

Here is my echo message

Here is the tmp file that I printed out with all kinds of wonderful ASCI text!

If not I will go ahead and accept you comment but if you can help I will add another 50.  Thanks!



0
 
LVL 6

Accepted Solution

by:
bira earned 300 total points
ID: 7180318
Randy2001
  Once you use the pipe (|), the mailx command interprets the input as the body or message.
 
   You could use as follow:
   
   cat yourfile | mailx mailusers@unixmail.com
-s"subject Line"

  But only one input. So i dont think it´s possible to do
  what you asked, using the pipe.

    Regards
0
 

Author Comment

by:Randy2001
ID: 7180352
OK.  Thanks anyway!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question