Solved

Using mailx to send some text instead of file.

Posted on 2004-04-07
3
1,170 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
Comment Utility
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
Comment Utility
or, you can do:
mailx -s "TEST" abc.com << END
type
stuff
here
and end
with
END
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now