Sponsored Content
Top Forums UNIX for Advanced & Expert Users Mailing thru UNIX shell script Post 26063 by jiin on Saturday 10th of August 2002 09:46:54 PM
Old 08-10-2002
With HP_UX you can use mailx or sendmail.

If your mailx isnt configured properly you will have to use sendmail. Scripted it would look like this:

uuencode name_of_file Name_you_want | sendmail address

The only issue is that sendmail doesnt allow you to set a subject header for the mail.

cat filename | mailx -s'Subject here' address

will read the file and send the file as the body of the message.

If your mailx is setup right then:

uuencode filename yourfilename | mailx -s'Subject here' address

jiin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mailing from unix -> exchange

Hello, I want to mail from Unix 4.3 (on an RS/6000) to my Microsoft exchange server (5.5). When I trie : mail -v erikr@domain.nl < /directory/file I get the following error: ^Cserverone:/etc >WARNING: The local host name (serverone) does not have a domain; fix$jnconfig ... (7 Replies)
Discussion started by: Erik Rooijmans
7 Replies

2. Shell Programming and Scripting

mailing from a shell script

Hi, This is what my script looks like: cd /var/apache/htdocs/MyApp var=`more /var/apache/htdocs/MyApp/activate` mailx -s "from MyApp" selma@mail.com <<EOT intro: -------------- $var EOT I get output that I would like to see when I invoke the script manually, this is is the... (2 Replies)
Discussion started by: Selma
2 Replies

3. Shell Programming and Scripting

Mailing in Korne shell

All Iam using Korne shell in AIX OS. Can u give me the syntax to send a mail. Thanx in advance Regards Deepak (5 Replies)
Discussion started by: DeepakXavier
5 Replies

4. Shell Programming and Scripting

Mailing script using loops

Hi all.. I'm not a scripter but I'm trying to set up a mail script that emails out once a file has been written to. Is there some way of writing a while read loop or something, so that it reads each line of the file and then ends when a specific number of lines have been written... We're... (2 Replies)
Discussion started by: Jazmania
2 Replies

5. Shell Programming and Scripting

Mailing script

Hi, I have a file lets say FILE1. FILE1 ------ name,age charlie,25 harry,29 david,32 Pls help me writing a mailing script.... which will mail the content of file in the body of the mail & it will look something like below in two columns. name age charlie 25 harry 29... (1 Reply)
Discussion started by: 46019
1 Replies

6. Shell Programming and Scripting

mailing problem in unix

I have a mailing problem in UNIX.... MAILT="$1" MAILTO=`echo $MAILT | tr ';' ','` CONTENT="/var/www/html/notifier/mailnotify_ccdb.html" SUBJECT="$2" CC="man@abc.com" BCC="ant@abc.com" ( echo "To : ${MAILTO}" echo "Cc : ${CC}" echo "Subject: $SUBJECT" echo "MIME-Version: 1.0" ... (3 Replies)
Discussion started by: rdhanek
3 Replies

7. UNIX for Dummies Questions & Answers

Mailing in unix

is there any option to mail the value from top command directly to the user.. i want the value of cpu usage from six different servers to be send in a single mail.. thanks, Arun Manas:b: (3 Replies)
Discussion started by: arunmanas
3 Replies

8. Shell Programming and Scripting

Mailing Script

Hi, I am totally New to This Scripting Area.We have developed some reports in Bo and User need those reports to be sent through Unix Server (SFTP). Can any one provide me script for transfering File from one location to other with the requirement like if that file fails to reach destination... (4 Replies)
Discussion started by: Sashanth_S
4 Replies

9. UNIX for Dummies Questions & Answers

Mailing file from UNIX/bash

I have a file that I want to mail out. However, I cannot get the date to print on it. I've tried the following: /usr/bin/mail -s "Lists on `date`" myname@company.com</tmp/list /usr/bin/mail -s "Lists on $(date)" myname@compancy.com</tmp/list $subj="Lists on $(date)" /usr/bin/mail -s... (3 Replies)
Discussion started by: newbie2010
3 Replies

10. Shell Programming and Scripting

Need syntax for mailing in UNIX by using html file as body and along with attachment

Hi All, I need a syntax for mailing in unix by using html code file output as body and along with attachment (without using mutt command) HTML code file : html1.txt Attachment : attach1.txt I was using the below codes but they are not working. ( cat html1.txt ; uuencode attach1.txt... (4 Replies)
Discussion started by: Rokkesh
4 Replies
SENSIBLE-MDA(8) 					      System Manager's Manual						   SENSIBLE-MDA(8)

NAME
sensible-mda - a generic local MDA router for Debian systems SYNOPSIS
sensible-mda from to detail client-addr DESCRIPTION
sensible-mda is used to simplify the installation and configuration of sendmail(8) , or other MTAs for use on Debian systems. With sensi- ble-mda, sendmail can support a plethora of MDAs (procmail, maildrop, deliver, etc.) without having pick any one of them as required. FUNCTION
sensible-mda is called by sendmail as a local mailer when the following exists in sendmail.mc: define(`LOCAL_MAILER_ARGS', `sensible-mda $g $u $h ${client_addr}')dnl sensible-mda will look for the following MDAs (in this order), and pass the mail on to the first SUID MDA found (Or first found MDA, if run w/euid=root): procmail(1), maildrop(1), deliver(8), mail.local(8) OPTIONS
Available command line options are the following: from The sender of this email (sendmail $g variable) to The recipient of this email (sendmail $u variable) detail The detail portion of the recipient userid (sendmail $h variable) - ie: cowboy+sendmail@debian.org client-addr TCP/IP address of the sender (sendmail ${client_addr} variable) Not used (for the nonce) FILES
/etc/mail/sendmail.mc sendmail m4 input to generate sendmail.cf /etc/mail/sendmail.cf actual sendmail configuration file (treated as a binary file) SEE ALSO
sendmail(8), procmail(1), maildrop(1), deliver(8), mail.local(8) BUGS
None known so far. AUTHOR
Richard Nelson <cowboy@debian.org> HISTORY
4th Berkeley Distribution October 21 1999 SENSIBLE-MDA(8)
All times are GMT -4. The time now is 11:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy