Sponsored Content
Top Forums Shell Programming and Scripting how to send contents of a file to email as a message Post 302149741 by varungupta on Friday 7th of December 2007 06:41:59 AM
Old 12-07-2007
Quote:
Originally Posted by ali560045
i have a file new1.txt
i want to send the contents of that file as a message to email ali@sms.com

i m using ksh script.........

plz help me
Hey,

use following ...

Subject="mailing you buddy.."
MAIL_RECIPIENTS="ali@sms.com, xyz@abccom"

cat new1.txt | mailx -s "$Subject" $MAIL_RECIPIENTS

Thanks
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Email message if file size > 0 bytes

I want to create a script that emails a file created by Informix Ace if the file size is > 0. It is a list of exceptions. No exceptions...no message This does not work: THESIZE=`ls -lA /tmp/ds_treo.txt | awk -F' ' '{print $5}'` if then (cat $DSDIR/ds_treo.txt) | mail -s "Treo... (1 Reply)
Discussion started by: poste_d_ordure
1 Replies

2. Shell Programming and Scripting

send a message through email to 5 people using unix script?

Hi All, I want to send a message through email to 5 people in unix script. Please let me know, how to do it.Please do reply it is urgent.How to do it?Please reply.thanks! Thanks, Mary. (2 Replies)
Discussion started by: MARY76
2 Replies

3. UNIX for Advanced & Expert Users

send a message through email to 5 people using unix script.

Hi All, I want to send a message through email to 5 people in unix script. Please let me know, how to do it.Please do reply it is urgent. Thanks, Mary. (3 Replies)
Discussion started by: MARY76
3 Replies

4. Shell Programming and Scripting

error-when trying to send the message thru email.

Hi All, I want to send a message through email. I have written below code. But it is not worling. Anybody has idea, why it is not working?. export $file1=$home1/pip1.$$ mailx -s "This Message from unix" abc@yahoo.com< $file1 thanks,Mary. (5 Replies)
Discussion started by: MARY76
5 Replies

5. Shell Programming and Scripting

Send-file /var/log/message

Hello All i need Shell Script to send /var/log/message or another if he have or grep this file to have some info like PID or value (e.g like NFS mount - stop ) to some body in my System Thanks for Advanced (2 Replies)
Discussion started by: Hosam
2 Replies

6. Shell Programming and Scripting

Problem with sending email(to include contents of text file)

Hello, I was using a shell script for sending contents of a text file(email.report) to different users. I was using the below command in my script to send email... cat email.report | /usr/bin/mailx -s $REQ_SUBJECT -h 5 abc@xyz.com It was working fine all these days but now all of a sudden it... (18 Replies)
Discussion started by: smarty86
18 Replies

7. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

8. Cybersecurity

How can you send a file over Ip.NOT EMAIL

So I was just wondering... Is there a way to send a file directly to the computer..... Ive never gotten the answer and I want to know how, I keep running in to a wall :wall:. Why you may ask, well really for security reasons due to the fact that if this is done via a port I want to make sure to... (3 Replies)
Discussion started by: orszhak
3 Replies

9. Shell Programming and Scripting

Capture all error message in Log file and send the Log file by email

Hi I have a requirement to write a script to capture all errors in a Logfile and send the file in email. If there is any error occurred the subject of email will be ERROR , If there are no error occurred the subject of email will be SUCCESS. So I created a Log file and put the Appropriate... (2 Replies)
Discussion started by: dgmm
2 Replies
rt-email-dashboards(8)					     Request Tracker Reference					    rt-email-dashboards(8)

NAME
rt-email-dashboards - Send email dashboards SYNOPSIS
rt-email-dashboards [options] DESCRIPTION
This tool will send users email based on how they have subscribed to dashboards. A dashboard is a set of saved searches, the subscription controls how often that dashboard is sent and how it's displayed. Each subscription has an hour, and possibly day of week or day of month. These are taken to be in the user's timezone if available, UTC otherwise. SETUP
You'll need to have cron run this script every hour. Here's an example crontab entry to do this. 0 * * * * /usr/bin/perl /opt/rt4/local/sbin/rt-email-dashboards This will run the script every hour on the hour. This may need some further tweaking to be run as the correct user. OPTIONS
This tool supports a few options. Most are for debugging. -h --help Display this documentation --dryrun Figure out which dashboards would be sent, but don't actually generate or email any of them --time SECONDS Instead of using the current time to figure out which dashboards should be sent, use SECONDS (usually since midnight Jan 1st, 1970, so 1192216018 would be Oct 12 19:06:58 GMT 2007). --epoch SECONDS Back-compat for --time SECONDS. --all Ignore subscription frequency when considering each dashboard (should only be used with --dryrun for testing and debugging) perl v5.14.2 2013-05-22 rt-email-dashboards(8)
All times are GMT -4. The time now is 10:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy