Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Email ids trucated in Mailx function Post 302546953 by sasi02 on Friday 12th of August 2011 03:13:32 PM
Old 08-12-2011
Email ids trucated in Mailx function

I wanted to send email to list of people using mailx in unix. I am getting the emailds from a oracle table and getting the ids in a variable. Shell script is shown below:
-----------------------------------------------------------------------
Code:
filename=testdata921 export filename
UTLFILE_DIR=/tmp1/test export UTLFILE_DIR
mailids=`
sqlplus -s $Username/$Pwd@$Database <<EOF
set heading off
set feedback off
select email_address from email_list where APPLICATION='TESTDATA921';
exit
EOF`
echo "$mailids"
sqlplus << EOF
$Username/$Pwd@$Database
whenever sqlerror exit failure;
execute PRC_FILE_GENERATE; --this generates testdata921 file
EOF
RC=$?
if [ $RC = 0 ]
then
echo "SQL executed successfully...."
cd $UTLFILE_DIR
unix2dos $filename.csv $filename.tmp
(uuencode $filename.tmp $filename.csv) | mailx -s "TESTDATA921 File" $mailids
 
else
echo "SQL was NOT successfully executed...."
echo "Program exited with RC=$RC"
exit $RC
fi

-----------------------------------------------------------------------
Output of below sql query is
Code:
select email_address from email_list where APPLICATION='TESTDATA921'; 
 
Sasikala.Mohan@xyz.com, Elaiyapallavan.Murugan@xyz.com, Nagamarimuthu.Karuppiah@xyz.com

-----------------------------------------------------------------------
It should send email to all the three persons. But if you see the output of echo in the unix screen it is

Code:
bash-3.00$ int1247_syst_1.ksh
Sasikala.Mohan@xyz.com,Elaiyapallavan.Murugan@xyz.com,Nagamarimuthu.Karupp
iah@xyz.com

So I am getting email with TO addresses as
Code:
Sasikala.Mohan@xyz.com
Elaiyapallavan.Murugan@xyz.com
Nagamarimuthu.Karupp@amrndhp0001g.xyz.com
iah@xyz.com

where amrndhp0001g is server name
Can anyone tell why is it so? Do i need to do something while getting the addresses in variable.

Note: If i assign the email ids directly to the variable mailids, it works fine.

Last edited by pludi; 08-12-2011 at 04:56 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies

2. Shell Programming and Scripting

Prallel function with different shell ids

Hi, I have a script as follows func1() { echo $$ } func1 func1 This returns the id of the current shell twice so outputs: 4201 4201 I'd like to change this script so the function is called in a different subshell each time, giving a different shell id for each function call.... (6 Replies)
Discussion started by: Fl3tchLiv3s
6 Replies

3. Forum Support Area for Unregistered Users & Account Problems

Please list email ids or contact info of members

Hi , Is it possible to list the user's email id for further communication. Thanks, MoonwalaPL (3 Replies)
Discussion started by: moonwalapl
3 Replies

4. UNIX for Dummies Questions & Answers

Sending mails to various users without hard coding the email IDS

Hi Can any one help me out ? I am trying to send an autogenerated mail with an attachment to bulk of users using 'MAILX' and 'UNENCODE' . I have used it as follows X " ( cat /sastemp/body.txt; uuencode Test.xls.gz Test.xls.gz ) | mailx -s 'Testing' ' abcd@yahoo.com , efgh@gmail.com ' " ... (9 Replies)
Discussion started by: manas6
9 Replies

5. UNIX for Dummies Questions & Answers

mailx - mail ti ids containing ampersand

Hi I am trying to send mail to an email id having ampersand in it. Like abc.&.xyz@abc.com But it is not being sent. I also tried prefixing backslash before and after ampersand Need Help:( (17 Replies)
Discussion started by: aniruddha.saha
17 Replies

6. HP-UX

Sending email to multiple IDs

Hi, I am trying to send an email to multiple IDs from Unix script. I have given the EmailIds in a file and trying to use the file as input in the script. > cat Email EmailID = "abc@xyz.com cbz@xyz.com" In my script I have . /Email mailx -s "subj" $EmailID This fails with the... (3 Replies)
Discussion started by: sangharsh
3 Replies

7. Shell Programming and Scripting

Send Email to group ids

hi, I want to send mail to DL... i am sending email to single id using mailx .. how to send to group of ids? :confused: i am using a file which conatins all the ids, is there any other way to send mail without creating the DLfile? DL=path\file.txt mailx -s "Info BG is now... (4 Replies)
Discussion started by: sreelu
4 Replies

8. Shell Programming and Scripting

Masking email ids / phone no's in file along with obscene words

Hi, I would like to know if there is a way to mask obscene words and other contents like email id's/phone numbers in the file. Below is the sample input /output. Sample data : cat smp.txt The service is really bad . My email abc@gmail.com You can contact me at 4078909831 Output... (2 Replies)
Discussion started by: ashwin3086
2 Replies

9. Emergency UNIX and Linux Support

Email ids from gecos

I would like to extract only the email ids from the gecos of each user id. I have to get the email ids of all the users on the server like this. Can someone please assist me with the command/script? (15 Replies)
Discussion started by: ggayathri
15 Replies

10. Shell Programming and Scripting

Email IDs added to .mailrc aliases not receiving mails

hi, I added an email id to a list of existing aliases in .mailrc on my unix box, using vi editor. However, the new id has not been receiving any mails from the box. Kindly help as to what needs to be done here. Does the box need to be rebooted for these changes to reflect? Is there any other... (5 Replies)
Discussion started by: qwerty000
5 Replies
doctools::toc::export::text(3tcl)				Documentation tools				 doctools::toc::export::text(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
doctools::toc::export::text - plain text export plugin SYNOPSIS
package require Tcl 8.4 package require doctools::toc::export::text ?0.1? package require doctools::text export serial configuration _________________________________________________________________ DESCRIPTION
This package implements the doctools table of contents export plugin for the generation of plain text markup. This is an internal package of doctools, for use by the higher level management packages handling tables of contents, especially doc- tools::toc::export, the export manager. Using it from a regular interpreter is possible, however only with contortions, and is not recommended. The proper way to use this func- tionality is through the package doctools::toc::export and the export manager objects it provides. API
The API provided by this package satisfies the specification of the doctoc export plugin API version 2. export serial configuration This command takes the canonical serialization of a table of contents, as specified in section ToC serialization format, and con- tained in serial, the configuration, a dictionary, and generates plain text markup encoding the table. The created string is then returned as the result of the command. CONFIGURATION
The text export plugin recognizes the following configuration variables and changes its behaviour as they specify. dictionary map This standard configuration variable contains a dictionary mapping from the (symbolic) document ids in reference entries to the actual filenames and/or urls to be used in the output. Document ids without a mapping are used unchanged. Note that this plugin ignores the standard configuration variables user, file, and format, and their values. TOC SERIALIZATION FORMAT
Here we specify the format used by the doctools v2 packages to serialize tables of contents as immutable values for transport, comparison, etc. We distinguish between regular and canonical serializations. While a table of contents may have more than one regular serialization only exactly one of them will be canonical. regular serialization [1] The serialization of any table of contents is a nested Tcl dictionary. [2] This dictionary holds a single key, doctools::toc, and its value. This value holds the contents of the table of contents. [3] The contents of the table of contents are a Tcl dictionary holding the title of the table of contents, a label, and its ele- ments. The relevant keys and their values are title The value is a string containing the title of the table of contents. label The value is a string containing a label for the table of contents. items The value is a Tcl list holding the elements of the table, in the order they are to be shown. Each element is a Tcl list holding the type of the item, and its description, in this order. An alternative descrip- tion would be that it is a Tcl dictionary holding a single key, the item type, mapped to the item description. The two legal item types and their descriptions are reference This item describes a single entry in the table of contents, referencing a single document. To this end its value is a Tcl dictionary containing an id for the referenced document, a label, and a longer textual descrip- tion which can be associated with the entry. The relevant keys and their values are id The value is a string containing the id of the document associated with the entry. label The value is a string containing a label for this entry. This string also identifies the entry, and no two entries (references and divisions) in the containing list are allowed to have the same label. desc The value is a string containing a longer description for this entry. division This item describes a group of entries in the table of contents, inducing a hierarchy of entries. To this end its value is a Tcl dictionary containing a label for the group, an optional id to a document for the whole group, and the list of entries in the group. The relevant keys and their values are id The value is a string containing the id of the document associated with the whole group. This key is optional. label The value is a string containing a label for the group. This string also identifies the entry, and no two entries (references and divisions) in the containing list are allowed to have the same label. items The value is a Tcl list holding the elements of the group, in the order they are to be shown. This list has the same structure as the value for the keyword items used to describe the whole table of contents, see above. This closes the recusrive definition of the structure, with divisions holding the same type of elements as the whole table of contents, including other divisions. canonical serialization The canonical serialization of a table of contents has the format as specified in the previous item, and then additionally satisfies the constraints below, which make it unique among all the possible serializations of this table of contents. [1] The keys found in all the nested Tcl dictionaries are sorted in ascending dictionary order, as generated by Tcl's builtin command lsort -increasing -dict. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category doctools of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
doctools, export, plain text, serialization, table of contents, toc CATEGORY
Text formatter plugin COPYRIGHT
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net> doctools2toc 0.1 doctools::toc::export::text(3tcl)
All times are GMT -4. The time now is 10:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy