I am working on a KornShell (ksh) script running on a Solaris server that will send out an email when and error condition is met. I am sending the email via mailx
On debian where bsd-mailx is installed by default, the -r option does not work. However you can use mailx -s subject recipient@abc.com -- -f sender@abc.com instead. According to man page, you can specify sendmail options after --.