How to set the From email address for mailx command?

前端 未结 8 715
鱼传尺愫
鱼传尺愫 2020-12-24 05:28

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

相关标签:
8条回答
  • 2020-12-24 06:26

    You can use the "-r" option to set the sender address:

    mailx -r me@example.com -s ...
    
    0 讨论(0)
  • 2020-12-24 06:31

    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 --.

    0 讨论(0)
提交回复
热议问题