邮件命令包含cc和linux



我得到-aFrom:sender@example.com包含无效字符':'

reciver1@example.com main recipient
reciver2@example.com should be in cc
sender@example.com should be sender  
echo "This is the message body" | mail -s "This is the subject" -c reciver1@example.com   reciver2@example.com -aFrom:sender@example.com 

mailx可以这样为您工作:

value="someValue"
mailx -s "This is the subject" -t <<EOF
To: receiver1@example.com
From: sender@example.com
Cc: receiver2@example.com
Bcc: receiver3@example.com
X-Extra-Flag: ${value}
This is the message.
EOF

相关内容

  • 没有找到相关文章

最新更新