سؤال

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?

هل كانت مفيدة؟

المحلول

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
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top