how to send mail automatically in unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to send mail automatically in unix
# 1  
Old 12-21-2005
Data how to send mail automatically in unix

Dear friends,

I am storing daily some data in a tape disk. and numbering it from 1 2 3 like this.

I want to get alert mail automatically when ever data is greater than or equal to 600.


to my yahoo mail.

i want to put that mail script in crontab so it will check the data daily at a particular time.

if data crossed 600 it should give mail alert to me.

how to write shell script for this.

please help
# 2  
Old 12-22-2005
how to send mail automatically in unix

Dear friends,

I am storing daily some data in a tape disk. and numbering it from 1 2 3 like this.

I want to get alert mail automatically when ever data is greater than or equal to 600.


to my yahoo mail.

i want to put that mail script in crontab so it will check the data daily at a particular time.

if data crossed 600 it should give mail alert to me.

how to write shell script for this.

please help
# 3  
Old 12-22-2005
rajan_ka1,
Do not bump up posts. Please note that this is against rule 4.
Quote:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.
# 4  
Old 12-22-2005
do to check, then

if (( $data > 600 ))
then
echo "Data exceeded 600 count, take action\n\nRegards,\nXYZ" | mailx -s "Subject : Data exceeded 600" youremail@yahoo.com
fi
# 5  
Old 12-22-2005
Dear friend,

I have executed your script.

I have given mailx -s "rajan" id@yahoo.com

at command prompt.

but the error mailx not found was coming.


please give me solution.

regards
rajan
# 6  
Old 12-22-2005
verify that mailx command is in your path (in /usr/bin for exemple)
# 7  
Old 12-23-2005
Dear friend,

In my bin directory mail command is there.

mailx command is not there.

please give solution.


regards
rajan
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Send mail from UNIX

Hi, I am executing the below commands, i didnt get any error and send mail not recevied by respective user. Please help cat a.txt | mailx -s "config" xxx@abc.com (4 Replies)
Discussion started by: sugumar
4 Replies

2. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies

3. Shell Programming and Scripting

send mail through Unix

Hi Can any one please help me how to send mail through unix. (3 Replies)
Discussion started by: parthmittal2007
3 Replies

4. Shell Programming and Scripting

send mail from unix

Hi all, I'm trying to send a mail from Unix to my company domain. It doesn't show me any error but i dnt even receive mail in my inbox. I'm using mailx -s "sub" name@company_domain.com <file.txt I have few contents in the file which should be sent as message body of the mail NOT... (3 Replies)
Discussion started by: bankimmehta
3 Replies

5. Shell Programming and Scripting

How to automatically send a mail alert if the script errors out

I have a script like this, which calls other scripts from that script: #!/usr/ksh moveFiles.sh extract.sh readfile=/home/sample.txt cat $readfile | while read line do file= `echo $line|awk '{print $4}'` if ; then mv $file /home/temp_stage fi (4 Replies)
Discussion started by: ss3944
4 Replies

6. Shell Programming and Scripting

How to send mail in Unix

Hi, I am able to generate the log file from my shell file. How can i send the content of the log file through mail to some one. Raja (6 Replies)
Discussion started by: konankir
6 Replies

7. UNIX for Dummies Questions & Answers

I am not able to send mail form unix to other mail accounts.

Using Mailx command i.e mailx -s "subject" chinni@hotmail.com < \tmp\chin this command executed sucessfully but not able to receive the mail in chinni@hotmail.com please help. (1 Reply)
Discussion started by: chinnigd
1 Replies

8. Shell Programming and Scripting

how to send mail in unix

Dear friends, I want to send mail automatically like (crontab). I have tried with mail command but it it not working. mail -s "hello" xyz@yahoo.com. please help. (12 Replies)
Discussion started by: rajan_ka1
12 Replies

9. Shell Programming and Scripting

Send mail with attachments automatically in a interval period

hai everyone I want to send mail with attachments automatically for every 15 minutes getting different E-mail IDs from a file if any script is available , Please send to me .. This will be very useful for my project.... Thanks for your time..... Felix ... (3 Replies)
Discussion started by: Leo Felix
3 Replies

10. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

hi, Gurus, I need some help with sending mail out from my UNIX server: It is running Solaris 2.6 and the sendmail version is 8.8. Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null Version 8.8.8+Sun Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET ... (5 Replies)
Discussion started by: b5fnpct
5 Replies
Login or Register to Ask a Question