- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: mailx not available, does sendmail have easy s...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 05:07 AM
06-12-2006 05:07 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 05:39 AM
06-12-2006 05:39 AM
Re: mailx not available, does sendmail have easy sending option?
mail -s
Works just like mailx from hpus
mail -s "Subject is this" mail@mynetwork.com
Done.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 05:50 AM
06-12-2006 05:50 AM
Re: mailx not available, does sendmail have easy sending option?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 06:09 AM
06-12-2006 06:09 AM
Re: mailx not available, does sendmail have easy sending option?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 07:53 AM
06-12-2006 07:53 AM
Re: mailx not available, does sendmail have easy sending option?
This worked without a problem for me:
echo "test text string" | mail -s "Subject" my.address@myhost.com
No extra entry was required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 01:44 PM
06-12-2006 01:44 PM
Re: mailx not available, does sendmail have easy sending option?
I've gotten to the point where I create alias for mailx on Linux, but that doesn't help with cron jobs.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 09:50 PM
06-12-2006 09:50 PM
SolutionBut yes. 'mail' is an inline mailbox tool, which can send mail etc..
If you invoke it as just:
mail -s "This is the subject" recipient@domain
It will take you into an input mode, waiting for you to type the message body (before ^D/EOFing the input stream).
So you have to pipe something into it, or through it. So either the 'echo' example above, or something like:
mail -s "This is an empty message" recipient@domain < /dev/null
To close off STDIN. Of course, you can make the 'mail' the output pipe of some other string of commands, i.e.:
grep -Ei "error|warning" /var/log/messages | mail -s "Logged errors" recipient@domain
but that's entirely up to you.
As with 'mailx', the exit-code from mail states whether the message was successfully submitted to the local MTA.