I am facing some problem with the mailx commmand. When i run the mailx command from the command line it sends it to the correct mail address which i mention.
#cat mailbody | mailx -s "Test" firstname.lastname@example.org
But when i run the same command from a perl script, it appends the machine name (hostname.abc.com) to the mail address, and the mail address (email@example.com - which i entered) becomes invalid (firstname.lastname@example.org - found in the maillog), failing to reach the receiver.
I am running it from the csh shell.
Kindly let me know on how to avoid this addition.
Thanks in advance