- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- To find out some script sample for sending mail
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
12-26-2002 07:16 PM
12-26-2002 07:16 PM
I want to use this function to alert system status.
I already check sendmail is work. I can use mailer of CDE to send mail to my other internet mail account was successful.
please provide some comment.
Thanks.
Taiyi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2002 07:22 PM
12-26-2002 07:22 PM
Solution# some_command_to_run | mailx -s "subject" mail_address@domain.com
Or if you wish to send to contents of an ascii file as in a message do:
# mailx -s "subject" mail_address@domain.com < /path/to/some_text_file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2002 07:23 PM
12-26-2002 07:23 PM
Re: To find out some script sample for sending mail
Script for d01 partition
thresh=98
actual=`bdf /d01|grep -v Filesystem|awk '{print $5}'|cut -c 1-2`
#Checks for thresh hold values.
if [ $actual -ge $thresh ] 2> /scripts/d01.err
then
echo $actual | mailx -s "d01 partition" 9823320605@orangemail.co.in else
echo $actual % at `date` >> /scripts/d01.stat
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2002 08:29 PM
12-26-2002 08:29 PM
Re: To find out some script sample for sending mail
command | mailx user@domain.com
or mailx username@domain.com < /etc/passwd
you can also use -v option to get the see the system messages ie verbose option incase you find any errors.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2002 04:29 AM
12-31-2002 04:29 AM
Re: To find out some script sample for sending mail
command to run | mailx -s "subject" -r return@address persontosendto
mailx -s "subject" -r returnaddress persontosendto < textfile
or lastly
cat file | mailx -s "subject" -r returnaddress persontosendto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2002 04:34 AM
12-31-2002 04:34 AM
Re: To find out some script sample for sending mail
do
uuencode $i $i.txt
done|mailx -m -s "test" username@whereever.com
live free or die
harry