Hello All,
I am working on a project where the requirement is override mailx command in such way that, instead of sending mailing to email addresses coded in codes, it should send mails to one common email address at run time.
We do not intend to change the email addresses in codes.
This problem was temporarily resolved by setting up aliases in .mailrc file. But I need to take care of any future new email addresses for which everytime I have to define new alias.
I thought of overriding mailx command to a function with name as mailx() in .profile which does this for me. But in that function I will not be able to read the attachment file as in below example:-
cat $filename |uuencode abcd.xls | mailx -s "Subject" $eml_adrs
I want this command to send the mail to my email address at place of $eml_adrs with AS IS body text and attachment. at RUNTIME.
Is there any way?
Thanks in advance. Looking Forward.
Regards
Shubham