I am trying to send an output of a script in an email.
I want to know if there is a way to modify the senders email not as my username on the host server but as one of the sender preset on outlook.
export ORACLE_HOME=/usr/local/opt/oracle/product/10.2.0
export PATH=${PATH}:${ORACLE_HOME}/bin
cat /dev/null > dsltn_sustaining
cat /dev/null > dsltn_sustaining_email.log
#some script contaning sql query
.getTNsql > dsltn_sustaining
echo "Fixing TNs in sustaining profile(s)" | tee -a dsltn_sustaining_email.log
cat dsltn_sustaining | while read dsltn
do
echo "TN ${dsltn}" | tee -a dsltn_sustaining_email.log
script1.ksh ${dsltn} >> dsltn_sustaining.log
done
tn_count=`cat dsltn_sustaining | wc -l`
echo "The number of TN's for which the sustaining profile fix was run is ${tn_count}" | tee -a dsltn_sustaining_email.log
cat dsltn_sustaining_email.log | /bin/mailx -c ggg@email.com -r ggg@email.com -s "List of TNs in sustaining profile" ggg@email.com>
/dev/null 2>&1