Subject Name not showing in my email using mail command

强颜欢笑 提交于 2019-12-12 19:09:41

问题


I am using mail command to send an email. It works fine.

echo "Ignore this email" | mail -s "Test Data" DL-host-PD-WAS-TT_Emp@corp.host.com

But the only confusion I have is, in my email I didn't get any subject and it always show as (no subject) in my email as I am also specifying subject option in the above command as -s but it is not working I guess somehow.

I am running SunOS.

bash-3.00$ uname -a
SunOS lvsaishdc3in0001 5.10 Generic_142901-02 i86pc i386 i86pc

And also I am not seeing To: list in my email. How can I make this thing works?


回答1:


On all Solaris systems, you should not use "mail", you should use "mailx". Try using mailx. http://www.cisl.ucar.edu/tcg/consweb/Solaris/mail.html

Modify your command like this-

echo "Ignore this email" | mailx -s "Test Data" DL-host-PD-WAS-TT_Emp@corp.host.com


来源:https://stackoverflow.com/questions/11889526/subject-name-not-showing-in-my-email-using-mail-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!