Sending email from UNIX server

Hi,

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.

I was using

cat email.log | /bin/mailx -c cclist -r myemailid -s "subject" tolistids

I want to change that myemailid to a name present in outlook.

Use code tags for code, please.

What do you have for your From header in the text file?

Also can you tell us what OS you are using:

uname

Also the mailx version that you are using:

$ mailx
Mail version 8.1 6/6/93

here is the code i was trying

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
$ uname
SunOS
$ mailx
mailx version 5.0

-r option is used to specify return/from address.

Just change it to whatever address you want:

/bin/mailx -c ggg@email.com -r ggg@email.com -s "List of TNs in sustaining profile" ggg@email.com