• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1181
  • Last Modified:

Using mailx to send some text instead of file.

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
rgregor6
Asked:
rgregor6
1 Solution
 
Alf666Commented:
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
 
fim32Commented:
or, you can do:
mailx -s "TEST" abc.com << END
type
stuff
here
and end
with
END
0
 
ahoffmannCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now