01-16-2009
Possible solution to first part
Instead of using 'sendmail', perhaps you want just 'mail'.
Try this and see how far it gets you:
# ls > ls.txt
# mail -s "ls output" youremail@yourhost < ls.txt
Then check your mail.
If you're sending to multiple recipients you may want to check to see if your mailer supports lists. Otherwise you'll have to write a script that opens up a file of recipients and loops over them:
onstat -d > onstat.txt
for r in `cat alertemails.txt`
do
mail -s "alert email" $r < onstat.txt
done
I think that will likely do what you want.
Good luck.
9 More Discussions You Might Find Interesting
1. Solaris
Hi,
I use the sendmail command to send automatic e-mail in my control programs,
but I'd like to know if there's a non interactive way to send an attachment,
like a small text file through sendmail command. I didn't find a way in the man, so anyone has already done it?.. give an example for the... (4 Replies)
Discussion started by: vastare
4 Replies
2. UNIX for Dummies Questions & Answers
Hello,
i am sending email with following command.
The problem is the attachment is displayed as inline text instead of a file attached to email. What should i do?
I don't have chance to install new binaries to the server (SunOS)
( \
echo From: Sender ; \
echo Subject: Testing ; \... (1 Reply)
Discussion started by: yakari
1 Replies
3. Shell Programming and Scripting
Hi All,,
After long time,
might be this is nth time post on this forum for the same query...but i tried browsing for sometime and i did not get what i wanted :)
i have following syntax in my shell scripting..
(cat filename.txt
uuencode attachment attachment)|/usr/lib/sendmail -t... (4 Replies)
Discussion started by: Shahul
4 Replies
4. UNIX for Advanced & Expert Users
hi..
Could somebody guide me how to send mail with attachment using sendmail command in unix ?
Thank you, (2 Replies)
Discussion started by: bh_hensem
2 Replies
5. Shell Programming and Scripting
I have an HTML file I am currently sending in the body of an email. I now have a need to send a csv attachment along with it. I can ONLY use sendmail as mutt and xmail etc are not on the server.
Here is what I am currently using: It is possible to add code to add an attachment ??!?
{
... (8 Replies)
Discussion started by: atelford
8 Replies
6. Shell Programming and Scripting
dear all
I have below function which send an email, but if I need to add an attachement it won't work instead it write some jibberish to body of the email
begin 644 SIGN_OFF_AP_20120626.csv
M4TE'3E]/1D9?4TA%150L351-7T1!5$4L0D]/2RQ35$%455,L5D%25%E012Q#
%3U5.5`H`
`
end
function... (6 Replies)
Discussion started by: manas_ranjan
6 Replies
7. Shell Programming and Scripting
Hi,
I am trying to send log file of a job run in unix machince through sendmail.Though I am able to send the text but it is not sending as attachment.
Could you please look into the code and let me know where I have gone wrong
fdate=`date %Y%j`... (2 Replies)
Discussion started by: Rossdba
2 Replies
8. Shell Programming and Scripting
Hello people,
I only have sendmail and uuencode on a Oracle (RH) linux server.
While:
/usr/bin/uuencode awr.html awr.html | /usr/sbin/sendmail myemail@company.com
Is working fine,
the ideal for me is to do something like:
echo "To: me@company.com" > /home/vasilis/msg.txt
echo "Subject: DB... (3 Replies)
Discussion started by: drbiloukos
3 Replies
9. Shell Programming and Scripting
Hi Folks
I have below code, which is able to successfully send the content of the output file as html which is body, but i did tried uuencode & mailx -a for sending attachments but to no avail.
cat - ${Output_File} <<EOF| /usr/sbin/sendmail -oi -t
#From: ${MAILFROM}
To: ${MAILTO}
Subject:... (5 Replies)
Discussion started by: nikhil jain
5 Replies
LEARN ABOUT DEBIAN
sup-mail
SUP(1) General Commands Manual SUP(1)
NAME
sup-mail - Sup, a thread-centric mailer with tagging and fast search
SYNOPSIS
sup-mail [options]
DESCRIPTION
This manual page documents briefly the sup-mail command.
Sup is a console-based email client. The command sup-mail invokes the interactive curses frontend. Several other commands are used to con-
figure Sup and add mail sources; please refer to the "New User's Guide" for details.
OPTIONS
--list-hooks, -l
List all hooks and descriptions, and quit
--no-threads, -n
Turn off threading. Helps with debugging. (Necessarily disables background polling for new messages.)
--no-initial-poll, -o
Don't poll for new messages when starting
--search, -s query
Search for this query upon startup
--compose, -c recipient
Compose message to this recipient upon startup
--version, -v
Show version of program
--help, -h
Show summary of options
FILES
$HOME/.sup/colors.yaml Color theme for Sup, see /usr/share/doc/sup-mail/examples for example themes
SEE ALSO
mail(1), sup-add(1), sup-cmd(1), sup-config(1), sup-dump(1), sup-import-dump(1), sup-recover-sources(1), sup-server(1), sup-sync(1), sup-
sync-back(1), sup-tweak-labels(1)
/usr/share/doc/sup-mail/NewUserGuide.txt.gz
AUTHOR
Sup was written by William Morgan <wmorgan-sup@masanjin.net>.
This manual page was written by Decklin Foster <decklin@red-bean.com> for the Debian project (but may be used by others).
SUP(1)