Sponsored Content
Top Forums Shell Programming and Scripting Read a file with in UNIX and send multiple mails Post 302333320 by DeepSalwan on Sunday 12th of July 2009 03:06:47 PM
Old 07-12-2009
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 scripting.Its quite urgent.

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to attach an excel file/ dat file thru unix mails

Hi. I want to attach a .xls or .dat file while sending mail thru unix. I have come across diff attachments sending options, but allthose embeds the content in the mail. I want the attachement to be send as such. Please help me out. regards Diwakar (1 Reply)
Discussion started by: diwakar82
1 Replies

2. UNIX for Dummies Questions & Answers

Parse Text file and send mails

Please help. I have a text file which looks something like this aaa@abc.com, c:FilePath\Eaaa.txt bbb@abc.com, c:FilePath\Ebbb.txt ccc@abc.com, c:FilePath\Eccc.txt ddd@abc.com, c:FilePath\Eddd.txt...so on I want to write a shell script which will pick up the first field 'aaa@abc.com' and... (12 Replies)
Discussion started by: Amruta Pitkar
12 Replies

3. Debian

cannot send any mails using mailx

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

4. 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

5. Shell Programming and Scripting

How to send a mail in unix--Please read the description

Hi frnds, I want to send 3 csv files as attachement in unix server how do i do this. Following is the steps which i need to follow: 1.Shell script sets the environment variables 2.Shell script calls a C++ executable NOTE:This executable will generate 3 csv files 3.After the... (2 Replies)
Discussion started by: electroon
2 Replies

6. UNIX for Dummies Questions & Answers

cant send mails with mpack/uuencode AIX 5.3

Hi all, I was using mpack for sending mails with pdf as attachment. It was working well. but some days back my server was shut down forcefully due to power failure and I found now the mails are moving to the queue always. I checked in /var/spool/mail/mqueue. Is the forece shutdown has to do... (0 Replies)
Discussion started by: itesh.dash
0 Replies

7. 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

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. Shell Programming and Scripting

Script for count files and send mails

Hi. I'm new on this forum and I need if possible someone to help me with one script. The script should act like this: - should be run by crontab and have next parameters: script_name $par1 $par2 $par3 $par4 where script will search in dir $par1 for files with mask $par2 and if number of... (2 Replies)
Discussion started by: atrailm
2 Replies
Qpsmtpd::Transaction(3pm)				User Contributed Perl Documentation				 Qpsmtpd::Transaction(3pm)

NAME
Qpsmtpd::Transaction - single SMTP session transaction data SYNOPSIS
foreach my $recip ($transaction->recipients) { print "T", $recip->address, ""; } DESCRIPTION
Qpsmtpd::Transaction maintains a single SMTP session's data, including the envelope details and the mail header and body. The docs below cover using the $transaction object from within plugins rather than constructing a "Qpsmtpd::Transaction" object, because the latter is done for you by qpsmtpd. API
add_recipient($recipient) This adds a new recipient (as in RCPT TO) to the envelope of the mail. The $recipient is a "Qpsmtpd::Address" object. See Qpsmtpd::Address for more details. remove_recipient($recipient) This removes a recipient (as in RCPT TO) from the envelope of the mail. The $recipient is a "Qpsmtpd::Address" object. See Qpsmtpd::Address for more details. recipients( ) This returns a list of the current recipients in the envelope. Each recipient returned is a "Qpsmtpd::Address" object. This method is also a setter. Pass in a list of recipients to change the recipient list to an entirely new list. Note that the recipients you pass in MUST be "Qpsmtpd::Address" objects. sender( [ ADDRESS ] ) Get or set the sender (MAIL FROM) address in the envelope. The sender is a "Qpsmtpd::Address" object. header( [ HEADER ] ) Get or set the header of the email. The header is a <Mail::Header> object, which gives you access to all the individual headers using a simple API. e.g.: my $headers = $transaction->header(); my $msgid = $headers->get('Message-Id'); my $subject = $headers->get('Subject'); notes( $key [, $value ] ) Get or set a note on the transaction. This is a piece of data that you wish to attach to the transaction and read somewhere else. For example you can use this to pass data between plugins. Note though that these notes will be lost when a transaction ends, for example on a "RSET" or after "DATA" completes, so you might want to use the notes field in the "Qpsmtpd::Connection" object instead. body_filename ( ) Returns the temporary filename used to store the message contents; useful for virus scanners so that an additional copy doesn't need to be made. Calling "body_filename()" also forces spooling to disk. A message is not spooled to disk if it's size is smaller than $self->config("size_threshold"), default threshold is 0, the sample config file sets this to 10000. body_write( $data ) Write data to the end of the email. $data can be either a plain scalar, or a reference to a scalar. body_size( ) Depreceated, Use data_size() instead. data_size( ) Get the current size of the email. Note that this is not the size of the message that will be queued, it is the size of what the client sent after the "DATA" command. If you need the size that will be queued, use my $msg_len = length($transaction->header->as_string) + $transaction->body_length; The line above is of course only valid in hook_queue( ), as other plugins may add headers and qpsmtpd will add it's Received: header. body_length( ) Get the current length of the body of the email. This length includes the empty line between the headers and the body. Until the client has sent some data of the body of the message (i.e. headers are finished and client sent the empty line) this will return 0. body_resetpos( ) Resets the body filehandle to the start of the file (via "seek()"). Use this function before every time you wish to process the entire body of the email to ensure that some other plugin has not moved the file pointer. body_getline( ) Returns a single line of data from the body of the email. body_fh( ) Returns the file handle to the temporary file of the email. This will return undef if the file is not opened (yet). In hook_data( ) or later you can force spooling to disk by calling $transaction->body_filename. dup_body_fh( ) Returns a dup()'d file handle to the temporary file of the email. This can be useful if an external module may call close() on the filehandle that is passed to it. This should only be used for reads, as writing to a dup'd filehandle may have unintended consequences. SEE ALSO
Mail::Header, Qpsmtpd::Address, Qpsmtpd::Connection perl v5.14.2 2010-02-12 Qpsmtpd::Transaction(3pm)
All times are GMT -4. The time now is 10:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy