I am executing the following command in order to send a file as an attachment:
mailx -s "Subject" emailID@xyz.com < Testfile.txt
Instead of attaching the file Testfile.txt, it is writing the contents of the file in the email message body. Please advise on how I can send the file as an attachment.
Thanks. But if I remove "<" , then where can I mention the attachment file name?
I tried "cat Testfile.txt | mailx -s "Subject" emailID@xyz.com" as well as "uuencode Testfile.txt | mailx -s "Subject" emailID@xyz.com".
Both of them gave me the same result...Contents of Testfile.txt in the email body..The file did not come as an attachment. Please advise.
Thanks for your suggestions...But none of these worked..In all these cases, the file content is coming as the message body...may be soem version difference...Anyways, I have to go ahead with it...So, implementing with the file as message body