我怎样才能从标有“优先级高”标志的控制台发送邮件?
目前我正在使用这个语法:
echo "message content" | mail -s "subject" [email protected]
我没有看到任何man在这个开关。
你可以使用sendmail吗? 如果是这样:
mymachine $ sendmail [email protected] <<EOM > To: [email protected] > From: [email protected] > Subject: Test mail `date +"%x %H:%M"` > Importance: high > X-Priority: 1 (Highest) > X-MSMail-Priority: High > > Test message > EOM mymachine $
>之后的文本将被input到换行符中。 当然,你可以pipe一个文本文件:
mymachine $ cat > message > To: [email protected] > From: [email protected] > Subject: Test mail `date +"%x %H:%M"` > Importance: high > X-Priority: 1 (Highest) > X-MSMail-Priority: High > > Test message ## CTRL+D ## mymachine $ cat message | sendmail [email protected]