Solved

Using mailx to send some text instead of file.

Posted on 2004-04-07
3
1,175 Views
Last Modified: 2010-04-21
I can use mailx to send file using "mailx -s "TEST" abc.com < filename" but how do I use mailx to send some text that I type ?
0
Comment
Question by:rgregor6
3 Comments
 
LVL 9

Expert Comment

by:Alf666
ID: 10775061
Just type :

mail user@domain.tld

It will ask you for the subject, and then you can type your text in.

End it with a point (".") alone at the beginning of a line.

0
 
LVL 7

Accepted Solution

by:
fim32 earned 250 total points
ID: 10777358
or, you can do:
mailx -s "TEST" abc.com << END
type
stuff
here
and end
with
END
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 10777442
echo "some text that I type"|mailx -s "TEST" abc.com
# but  fim32's here document is more likely what you need
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

756 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