I'm using a Shell Script to send email's as an attachment.
I'm Storing the email address in a table and catching in a variable.
MAILLIST=`noarg sqlplus -s $OraUsr << EOF
set heading off
set feedback off
set echo off
SELECT email_ids
FROM tpemail_table
WHERE ltrim(rtrim(interface_name)) = '$INT_CODE'
AND instance = '$TWO_TASK';
quit;
EOF`
When I echo the email list.
Echo Mailing List - $MAILLIST
I see the email is broken at every 80 Character.
So the first 80 characters email ids are receiving the emails, but the rest are ignored.
SQL> set lines 20
SQL> select 'qwertzuiopasdfghjklyxcvbnm' from dual;
qwertzuiopasdfghjkly
xcvbnm
SQL> set lines 100
SQL> r
qwertzuiopasdfghjklyxcvbnm
SQL>
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags
```text
and
```
by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
MAILLIST=`noarg sqlplus -s $OraUsr << EOF
set heading off
set feedback off
set echo off
SELECT email_ids
FROM tpemail_table
WHERE ltrim(rtrim(interface_name)) = '$INT_CODE'
AND instance = '$TWO_TASK';
quit;
EOF`
Should be:
MAILLIST=`noarg sqlplus -s $OraUsr << EOF
set heading off
set feedback off
set echo off
SELECT email_ids
FROM tpemail_table
WHERE ltrim(rtrim(interface_name)) = '$INT_CODE'
AND instance = '$TWO_TASK';
quit;
EOF
`
or does the database field "email_ids" contain a list of 25 email addresses?
Do you intend to invoke "mailx" once for each email address , or once for all 25 addresses?
There is much variation in "mailx", the maximum size of an environment variable, and the length of a command line. What Operating System do you have? What shell are you using?