Sent output to email and empty folder at same time

Hi all,

i want to sent output to email and folder at same time. This is my code :

 echo "Hello" | mailx -s "${SUBJECT}" "${email_add}"  >> ${file}

I only can sent output to my email but cannot sent to my empty folder....can i know how to done it?

Perhaps you can do this using tee.

i.e.

 echo "Hello" | tee -a $file | mailx -s "${SUBJECT}" "${email_add}"