Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Parse Text file and send mails Post 302084211 by Amruta Pitkar on Wednesday 9th of August 2006 10:30:35 PM
Old 08-09-2006
Hi Dhruva

I tried ur newer suggestion :

set -x

for input_dir_row in `cat mailse1.lst`
do
file_name=`echo $input_dir_row | cut -f2`
mail_id=`echo $input_dir_row | cut -d ',' -f1`

SUBJ="Send mail from Unix with file attachments"
TO=$mail_id
(
cat << !
To : ${TO}
Subject : ${SUBJ}
!

cat << !
HOPE THIS WORKS
you got mail from sendmail utility
!

uuencode -m $file_name $file_name
) | sendmail -v ${TO}
done

Can u pls. explain what
cat << !
To : ${TO}
Subject : ${SUBJ}
!
does exactly.
From what I understand it assigns the To and Subject value and displays it on the screen.
But since the time I have been using the '-m' option with uuencode i cannot see these values on the screen.

What excatly is happening here ?

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to redirect all mails to text file?

Hi, I need to develop one application that reads all my mails (in unix mail box), and write into one txt file, My server is AIX .My mails are in AIX mail box. Any idea? (0 Replies)
Discussion started by: redlotus72
0 Replies

2. Debian

cannot send any mails using mailx

hi howto configure mailx ? kind regards ccc (11 Replies)
Discussion started by: ccc
11 Replies

3. AIX

Not able to send mails

Hi, I am not able to send mails to the recipents. I am using AIX 5.3 Version and using the below command. cat test.log|mail -s "TestMail" user1@mail.com Can you please tell me is there any configurations to be done or is the above command wrong? Thanks & Regards Sheshadri (3 Replies)
Discussion started by: arsheshadri
3 Replies

4. Shell Programming and Scripting

parse the file and send email

Hi Experts, I am writing a script in which i want to parse the file and send the emails to some email-id's. The problem is like this-- I use to get some emails on saturday and sunday's but we do not work on these days. So what i want to do is forward those emails to some email id's. I want... (1 Reply)
Discussion started by: namishtiwari
1 Replies

5. Shell Programming and Scripting

Read a file with in UNIX and send multiple mails

Hi-I want to create a shell script which should read a file line by line (file having email address and transaction id of each user)and send email on email ids with the transaction id of the user respectively. Please help - I think a while loop should help but I am very new too UNIX Shell... (1 Reply)
Discussion started by: DeepSalwan
1 Replies

6. Red Hat

not able to send mails from linux

I am using centOS 5.3 as server, and i hav installed sendmail-8.13.8-2.el5.i386. But still, m not able to send mails to outer domain. Do i need to configure DNS for this? PLease suggest a step by step guide, if u hav, for the concern, as i m new to linux and sendmail as well.. thanks (1 Reply)
Discussion started by: oracle.test2
1 Replies

7. UNIX for Advanced & Expert Users

Parse text file values and send those files as an attachment

We have these files in say \home\abcd\dm Summary.txt log_SI-100.lst log_SI-101.lst log_SI-106.lst The contents of Summary.txt is as below ./log_SI-100.lst:Error detected, rollbacking ./log_SI-101.lst:Error detected, rollbacking ./log_SI-106.lst:Error detected, rollbacking Now i... (5 Replies)
Discussion started by: depakjan
5 Replies

8. UNIX for Advanced & Expert Users

shell script to send separate mails to different users from a text file

Hi Friends, Could you guys help me out of this problem... I need to send an email to all the users and the email has to be picked from the text file. text file contains the no. of records like: Code: giridhar 224285 847333 giridhar276@gmail.com ramana 84849 33884... (0 Replies)
Discussion started by: giridhar276
0 Replies

9. Shell Programming and Scripting

Send Receive Mails

Hi All, I am writing one script to automate one long process. In this process we need to upload some input files and download some output files. So , I want to automate this upload and download by using mail functionality. I want to trigger this script when I am sending mail to server. I know... (0 Replies)
Discussion started by: NirajThakar
0 Replies

10. Red Hat

Postfix - Send mails to specific domains only

Hello, I am working on postfix server on CentOS 5.8 which will be send mails to a specific domain only. All the things are nearly finished but i am not getting how to setup the postfix to send mails to specific domains. Please help me out. Thanks, Sunny (2 Replies)
Discussion started by: sunnysthakur
2 Replies
NAMESPACE(6)							   Games Manual 						      NAMESPACE(6)

NAME
namespace - name space description file DESCRIPTION
Namespace files describe how to construct a name space from scratch, an operation normally performed by the newns subroutine (see auth(2)) which is typically called by init(8). Each line specifies one name space operation. Spaces and tabs separate arguments to operations; no quotes or escapes are recognized. Blank lines and lines with # as the first non-space character are ignored. Environment variables of the form $name are expanded within arguments, where name is a UTF string terminated by white space, a /, or a $. The known operations and their arguments are: mount [-abc] servename old [spec] Mount servename on old. bind [-abc] new old Bind new on old. import [-abc] host "[remotepath]mountpoint Import remotepath from machine server and attach it to mountpoint. cd dir Change the working directory to dir. The options for bind, mount, and import are interpreted as in bind(1) and import(4). SEE ALSO
bind(1), namespace(4), init(8) NAMESPACE(6)
All times are GMT -4. The time now is 01:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy