I have installed oracle 11.2 on OEL 4.7 and OEL is installed on VMware. I want to practise shell scripting and send alerts to my gmail account(for example i want to send mail to my gmail account when tablespace is 90% full). I am aware of how to write shell script but dont know how to implement send mail feature.Can you guys help me what are the things required to implement this.
As sb92075 pointed you can achieve your objective through "mailx" command.
Configure sendmail and this will do the trick for you, and doing this is not so complicated and you may finish this within 10-15 mins.
Please refer following notes:
How to Configure Sendmail to Send and Receive Mail [ID 1019163.1]
I have already tried it but did not get any mail in my gmail account, so my question is what are the things required to implement at OS/database level so that i will receive mail in my mail account.
Thanks Asif, u got my question right. Working on your suggestions will let you know the result once done.
Posting such a question in the Database forum is probably not the best idea. You might consider searching or using the Oracle Linux forum, which has already several threads and solutions about the same question.
there's more than one reason why your mail can get rejected. you should try to check what /var/log/maillog says when you try to send mail.