Table Driven Mail List fails in Unix AIX

October 17, 2010 at 23:31:53
Specs: Windows XP
Hi,

I am having a table in my Oracle database (parameters_t). I have stored a mailing list as follows
Parameter Value
--------- -----
maillist Arnold.A.Swarchenegger@xyzmail.com Elizabeth.Z.Taylor@xyzmail.com Firstname.M.Lastname@xyzmail.com

Value is Varchar(4000)
Oracle environment: Oracle 10g

Now my shell script in Kron has the following mailx (Universal mailer)command.

EMAIL=$(print select Value from parameters_t where parameter = 'maillist');
mailx -s "Hi" $EMAIL </directory/subdir/mailtext;


But mailx fails for the third mail address since Unix a inserts space as follows

Arnold.A.Swarchenegger@xyzmail.com Elizabeth.Z.Taylor@xyzmail.com Firstname.M.La stname@xyzmail.com

I found this out by giving
echo $EMAIl>log;

Your inputs on why this happens and workarounds available.


See More: Table Driven Mail List fails in Unix AIX

Report •

#1
October 18, 2010 at 12:53:17
I am not an Oracle guy, but try placing double quotes around your $EMAIL variable:

# Untested
EMAIL=$(print select Value from parameters_t where parameter = 'maillist');
mailx -s "Hi" "$EMAIL" </directory/subdir/mailtext;


Report •
Related Solutions


Ask Question