05-31-2011
ideally, the command should be
mail -s "Subject" email-address < file_name
did u try using mailx or sendmail ?
10 More Discussions You Might Find Interesting
1. Solaris
Hi all,
Our servers were on Sun Solaris 8.1, anytime a cron job executed the user ran that job received a email of job's output. I think that the default and Administrator did not setup anything.
However, when we upgraded the OS to Sun Solaris ver.10, the cron job is no longer send a email... (2 Replies)
Discussion started by: cmnguyen
2 Replies
2. UNIX for Dummies Questions & Answers
i'd like to be able to run a cron job from a specific folder
/var/www/html
a php script which imports rss feeds
i created a simple shell script
cd /var/www/html
php -q import.php
webmin says it executed correctly, but when i check the site, nothing has happened
what am i doing... (1 Reply)
Discussion started by: sanchoquixote
1 Replies
3. AIX
Hi,
I'm fairly new to Aix and am looking for some help on the following.
I have setup a cron job under root and want it to send the email once it's run to an external email address. I can get it to send the output in an email to me by using mail on the end of the crontab entry. But I would... (1 Reply)
Discussion started by: elmesy
1 Replies
4. Shell Programming and Scripting
Hi guys, not sure if this would be the right place for this but I dont where else it would go... I'm new to Unix too, so please bare with me :)
I guess first up some background on the situation. We have some scripts that run as cron jobs which monitor and check the health, etc of our servers.... (2 Replies)
Discussion started by: BrianD
2 Replies
5. Shell Programming and Scripting
Hi,
The HPCs I used earlier used PBS (Portable Batch System) to schedule when I was running various jobs and it had an option to send me an email once a job is completed.
I'm wondering whether this is possible for any other process (without the use of PBS). For example, I'm running some codes... (2 Replies)
Discussion started by: lost.identity
2 Replies
6. Shell Programming and Scripting
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
7. UNIX for Advanced & Expert Users
Is there a way I can send a text file directly to my Drafts folder? (1 Reply)
Discussion started by: idontknow
1 Replies
8. Shell Programming and Scripting
how to run a script using cron job and send the output as attachment via e-mail using unix. please help me.
how my cron job entry should be?
As of now my cron job entry is to run the script at specific time,
15 03 * * * /path/sample.sh | mail -s "Logs" email_id
In the above entry, what... (8 Replies)
Discussion started by: vidhyaS
8 Replies
9. Shell Programming and Scripting
I am using centos 6.4.
I have a few cron jobs setup and they all work fine.
However, I would like to enhance one of the crons.
This is what I have at the moment:
nice rsync -au /home/samba/wsaler/* /home/samba/wsaler.backup/wsaler.backup18pm
date | /bin/mail -s "wsaler 3:00pm backup... (8 Replies)
Discussion started by: countrydj
8 Replies
10. Shell Programming and Scripting
Team,
Would like to know what is the best script that will send you an email if cronjob did not run.
Thanks (4 Replies)
Discussion started by: kenshinhimura
4 Replies
LEARN ABOUT OSF1
vacation
vacation(1) General Commands Manual vacation(1)
NAME
vacation - Informs senders of mail that recipient is absent
SYNOPSIS
vacation -I
The vacation command returns a message to the sender of a mail message, saying that the recipient is on vacation or otherwise absent.
OPTIONS
Initializes the $HOME/.vacation.pag and $HOME/.vacation.dir files. Execute this option before you modify your $HOME/.forward file.
DESCRIPTION
The vacation command accepts standard input and attempts to send a vacation message to the user specified in that input, which should be a
mail message. The vacation command is usually invoked in your $HOME/.forward file, which is used to forward your mail to another username.
When you want vacation messages to be sent to users who send you mail, enter the following in your $HOME/.forward file:
user, "|vacation user"
Replace user by your username. This allows mail sent to you to be both received by you and piped to the vacation command; vacation reads
the mail message, determines the sender, and sends a reply. The sender receives a vacation message, and the original mail is waiting in
your mailbox when you return.
When vacation is invoked without the -I option, as in the file, it reads the first line from the standard input for a From line to deter-
mine the sender. If this is not present, an error message is produced. (All properly formatted incoming mail should include a From line.)
No vacation message is sent if the From header line indicates that the message is from Postmaster; from MAILER-DAEMON; if the initial From
line includes the string -REQUEST@; or if a Precedence: bulk or Precedence: junk line is included in the header.
You must initialize vacation for your username by issuing the command vacation -I before you can use the vacation command.
The vacation command expects a $HOME/.vacation.msg file containing a message to be sent back to each sender. The file should be an entire
message, including any desired headers, such as From or Subject. This message will be sent only once a week to each unique message sender.
(If this file does not exist, vacation uses /usr/share/lib/vacation.def, a system-wide default vacation message, if it exists.)
The names of people who have sent you messages are kept in the files $HOME/.vacation.pag and $HOME/.vacation.dir. These files are created
when you initialize vacation for your username with vacation -I.
EXAMPLES
If your username is myra and you want to send a message once a week to each person who has sent you mail, initialize vacation by entering:
vacation -I
Next, add the following line to your $HOME/.forward file (create this file if it does not exist):
myra, "|vacation myra"
If you want to send a vacation message other than the system default message in /usr/share/lib/vacation.def, create the file in your home
directory and enter the message in it. For example:
From: myra@k.table (Myra Louise Minter) Subject: I am on vacation. Delivered-By-the-Graces-Of: the Vacation program
I am on vacation until October 1. If you have something urgent, please telephone Lucy or Sue.
-- Myra
FILES
System-wide default vacation message. Contains address to which mail is forwarded. Contains the names of people who have sent you mail
while the vacation command was being used. Contains the names of people who have sent you mail while the vacation command was being used.
Contains your personal vacation message.
SEE ALSO
Commands: mail(1), mailx(1), sendmail(8)
vacation(1)