We have created a UNIX program which is used to send mails. In that program we are fetching the mail subject and body based on user inputs (through Oracle Concurrent Program)
For example:
The complete user inputs of concurrent program are storing in $1
variable which is as below:
XX_EMAIL_FILES FCP_REQID=9614696 FCP_LOGIN="APPS/sup12" \
FCP_USERID=5667 \
FCP_USERNAME="SRI" \
FCP_PRINTER="noprint" \
FCP_SAVE_OUT=Y \
FCP_NUM_COPIES=1 \
"9614556_SUP12_XX_Workflow_Stuck_AP_Invoices.csv" \
"/tmp_mnt2/attachments" \
"Sri.B@xx.com" \
"This is the subject for the mail" \
"PFA for the list of Invoices that are stuck in workflow."
Here, subject for mail is This is the subject for the mail
which we are storing in variable SUB
and body for mail is PFA for the list of Invoices that are stuck in workflow.
which we are storing in another variable FCP_BODY
.
Now, I wrote as below to send mail
echo "Hello,
${FCP_BODY}
Thanks,
Bommi
"| mailx -s $SUB
But, in the mail I received, the body is coming properly, but subject is coming just This
.
Can anyone please help me on how to fetch the complete subject to send mail?
$SUB
variable contains multiple words you should quote the variable with| mailx -s "$SUB"
– user000001 Aug 14 '19 at 11:51mailx
. e.g. mime-construct - this is available packaged for debian, and probably other distros too. – cas Aug 14 '19 at 14:44