Solved

Using mailx to send some text instead of file.

Posted on 2004-04-07
3
1,174 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

840 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